From 2c8904506a9931c9d355cd6dbdb9a13efe61761c Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 21 Jun 2017 13:52:42 -0400 Subject: [PATCH] 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 --- qa/tasks/ceph.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index f2c5ee75cf3..1a950f0870f 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',