From: Kefu Chai Date: Wed, 17 Jan 2018 14:20:39 +0000 (+0800) Subject: qa/tasks/ceph: ignore failure when chown ceph:ceph X-Git-Tag: v14.1.0~909^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9f5238037a1afa9b1e5407c95466f20f7b990b41;p=ceph-ci.git qa/tasks/ceph: ignore failure when chown ceph:ceph 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 --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 177fb0d2db2..c6336d5d18d 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -796,9 +796,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() @@ -890,9 +895,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(