]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: allow 'ceph' user to read vault token 34613/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 20 Apr 2020 14:50:00 +0000 (10:50 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 20 Apr 2020 15:36:51 +0000 (11:36 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/tasks/rgw.py

index 199aa63f811d64f30948e2c1f10b42eab05afb17..70bc9f88cfa6150a2dbcf71c6af03fac1f3af058 100644 (file)
@@ -132,10 +132,11 @@ def start_rgw(ctx, config, clients):
                 raise ConfigError('vault: no "root_token" specified')
             # create token on file
             ctx.cluster.only(client).run(args=['echo', '-n', ctx.vault.root_token, run.Raw('>'), token_path])
-            log.info("Restrict access to token file")
-            ctx.cluster.only(client).run(args=['chmod', '600', token_path])
             log.info("Token file content")
             ctx.cluster.only(client).run(args=['cat', token_path])
+            log.info("Restrict access to token file")
+            ctx.cluster.only(client).run(args=['chmod', '600', token_path])
+            ctx.cluster.only(client).run(args=['sudo', 'chown', 'ceph', token_path])
 
             rgw_cmd.extend([
                 '--rgw_crypt_vault_addr', "{}:{}".format(*ctx.vault.endpoints[vault_role]),