mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
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 <sage@redhat.com>
This commit is contained in:
parent
0eed85515a
commit
2c8904506a
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user