]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: ignore failure when chown ceph:ceph 25227/head
authorKefu Chai <kchai@redhat.com>
Wed, 17 Jan 2018 14:20:39 +0000 (22:20 +0800)
committerPrashant D <pdhange@redhat.com>
Thu, 22 Nov 2018 22:25:28 +0000 (17:25 -0500)
we didn't have ceph:ceph user back in hammer. so ignore this error.
ceph-common will create this user in newer version. and `ceph` task will
take care of this, when upgrading to a newer version.

Fixes: http://tracker.ceph.com/issues/22597
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 9f5238037a1afa9b1e5407c95466f20f7b990b41)

qa/tasks/ceph.py

index e53adcf31a713a5a835e04dc60cbd88dcdbb72d0..92bff4201f05663096514d3b79482ff678769cf9 100644 (file)
@@ -815,9 +815,14 @@ def cluster(ctx, config):
                 )
             mnt_point = DATA_PATH.format(
                 type_='osd', cluster=cluster_name, id_=id_)
-            remote.run(args=[
-                'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
-            ])
+            try:
+                remote.run(args=[
+                    'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
+                ])
+            except run.CommandFailedError as e:
+                # hammer does not have ceph user, so ignore this error
+                log.info('ignoring error when chown ceph:ceph,'
+                         'probably installing hammer: %s', e)
 
     log.info('Reading keys from all nodes...')
     keys_fp = StringIO()
@@ -909,9 +914,14 @@ def cluster(ctx, config):
                     '--keyring', keyring_path,
                 ],
             )
-            remote.run(args=[
-                'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
-            ])
+            try:
+                remote.run(args=[
+                    'sudo', 'chown', '-R', 'ceph:ceph', mnt_point
+                ])
+            except run.CommandFailedError as e:
+                # hammer does not have ceph user, so ignore this error
+                log.info('ignoring error when chown ceph:ceph,'
+                         'probably installing hammer: %s', e)
 
     run.wait(
         mons.run(