This ensure they are in the OSDMap before the CRUSH
map, which avoids the OSD_ORPHAN health warning.
Signed-off-by: Sage Weil <sage@redhat.com>
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',