From: Sage Weil Date: Wed, 21 Jun 2017 17:52:42 +0000 (-0400) Subject: qa/tasks/ceph: create osds before starting X-Git-Tag: v12.1.2~1^2~19^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2c8904506a9931c9d355cd6dbdb9a13efe61761c;p=ceph.git qa/tasks/ceph: create osds before starting This ensure they are in the OSDMap before the CRUSH map, which avoids the OSD_ORPHAN health warning. Signed-off-by: Sage Weil --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index f2c5ee75cf3f..1a950f0870f8 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1100,6 +1100,37 @@ def run_daemon(ctx, config, type_): continue _, _, id_ = teuthology.split_role(role) + if type_ == 'osd': + datadir='/var/lib/ceph/osd/ceph-' + id_ + osd_uuid = teuthology.get_file( + remote=remote, + path=datadir + '/fsid', + sudo=True, + ).strip() + try: + remote.run( + args=[ + 'sudo', + 'ceph', + 'osd', + 'new', + osd_uuid, + id_, + ] + ) + except: + # fallback to pre-luminous + remote.run( + args=[ + 'sudo', + 'ceph', + 'osd', + 'create', + osd_uuid, + id_, + ] + ) + run_cmd = [ 'sudo', 'adjust-ulimits',