]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix client keyring permissions
authorVasu Kulkarni <vasu@redhat.com>
Wed, 7 Dec 2016 06:54:54 +0000 (22:54 -0800)
committerVasu Kulkarni <vasu@redhat.com>
Tue, 20 Dec 2016 22:42:58 +0000 (14:42 -0800)
Fix client keyring permission for workunits

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/ceph_ansible.py

index a39a00458a83062b2c519ff7b7c22688266f1b9f..0d8c7c663a38e8f49d420c16d4fad99b1c69658c 100644 (file)
@@ -348,7 +348,19 @@ class CephAnsible(Task):
         wait_for_health = self.config.get('wait-for-health', True)
         if wait_for_health:
             self.wait_for_ceph_health()
+        # for the teuthology workunits to work we
+        # need to fix the permission on keyring to be readable by them
+        self.fix_keyring_permission()
 
+    def fix_keyring_permission(self):
+        clients_only = lambda role: role.startswith('client')
+        for client in self.cluster.only(clients_only).remotes.iterkeys():
+            client.run(args=[
+                'sudo',
+                'chmod',
+                run.Raw('o+r'),
+                '/etc/ceph/ceph.client.admin.keyring'
+            ])
 
 
 class CephAnsibleError(Exception):