From: Vasu Kulkarni Date: Wed, 7 Dec 2016 06:54:54 +0000 (-0800) Subject: Fix client keyring permissions X-Git-Tag: 1.1.0~479^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b11018f750323d9ed93063e7587217aa6cfacc84;p=teuthology.git Fix client keyring permissions Fix client keyring permission for workunits Signed-off-by: Vasu Kulkarni --- diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index a39a00458..0d8c7c663 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -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):