]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph_manager: kludge around /var/log/ceph permissions
authorSage Weil <sage@redhat.com>
Fri, 24 Jan 2020 03:25:08 +0000 (21:25 -0600)
committerSage Weil <sage@redhat.com>
Fri, 24 Jan 2020 03:25:08 +0000 (21:25 -0600)
The ceph.py task normally makes these permissive.  But a package upgrade
can reset the permissions so that we can't read and write the temp
export files.  (We put them in these dirs now because it's alreadly
mapped out of cephadm containers to the host.)

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph_manager.py

index 345466220d2c75467e6da201cdd935361cb5f9d0..8441506c9599811897d2dca9a32e358b37b95b40 100644 (file)
@@ -374,6 +374,9 @@ class OSDThrasher(Thrasher):
                         # Copy export file to the other machine
                         self.log("Transfer export file from {srem} to {trem}".
                                  format(srem=exp_remote, trem=imp_remote))
+                        # just in case an upgrade make /var/log/ceph unreadable by non-root,
+                        exp_remote.run(args=['sudo', 'chmod', '777', '/var/log/ceph'])
+                        imp_remote.run(args=['sudo', 'chmod', '777', '/var/log/ceph'])
                         tmpexport = Remote.get_file(exp_remote, exp_host_path)
                         Remote.put_file(imp_remote, tmpexport, exp_host_path)
                         os.remove(tmpexport)