From: Sage Weil Date: Fri, 16 Nov 2018 06:22:17 +0000 (-0600) Subject: Merge PR #19987 into master X-Git-Tag: v14.1.0~909 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d941b28089fb9b1a214b96e65bd51ddcb774ae58;p=ceph.git Merge PR #19987 into master * refs/pull/19987/head: qa/tasks/ceph: ignore failure when chown ceph:ceph Reviewed-by: Josh Durgin --- d941b28089fb9b1a214b96e65bd51ddcb774ae58 diff --cc qa/tasks/ceph.py index a55a69d85715,c6336d5d18d3..cff56c0b0268 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@@ -776,47 -778,32 +776,52 @@@ def cluster(ctx, config) for role in teuthology.cluster_roles_of_type(roles_for_host, 'osd', cluster_name): _, _, id_ = teuthology.split_role(role) - remote.run( - args=[ - 'sudo', - 'MALLOC_CHECK_=3', - 'adjust-ulimits', - 'ceph-coverage', - coverage_dir, - 'ceph-osd', - '--cluster', - cluster_name, - '--mkfs', - '--mkkey', - '-i', id_, + try: + remote.run( + args=[ + 'sudo', + 'MALLOC_CHECK_=3', + 'adjust-ulimits', + 'ceph-coverage', + coverage_dir, + 'ceph-osd', + '--no-mon-config', + '--cluster', + cluster_name, + '--mkfs', + '--mkkey', + '-i', id_, '--monmap', monmap_path, - ], - ) + ], + ) + except run.CommandFailedError: + # try without --no-mon-config.. this may be an upgrade test + remote.run( + args=[ + 'sudo', + 'MALLOC_CHECK_=3', + 'adjust-ulimits', + 'ceph-coverage', + coverage_dir, + 'ceph-osd', + '--cluster', + cluster_name, + '--mkfs', + '--mkkey', + '-i', id_, + '--monmap', monmap_path, + ], + ) 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()