mirror of
https://github.com/ceph/ceph
synced 2025-01-02 09:02:34 +00:00
qa/tasks/rebuild_mondb: use monmap to properly name the mons
We used to rely on the monmap bootstrap code to magically create a valid monmap with named mons because our old-style ceph.conf had mon_addr values in each mon.foo section. Instead, just feed it a real monmap from pre-destruction. In practice, a user can manually generate this monmap, or rename the mons after the fact with --inject-monmap, or whatever. Out of scope for this test, so we just do the simplest thing to make the rebuild test work. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b6b7ef8af4
commit
c18a5d2e1c
@ -18,6 +18,7 @@ tasks:
|
||||
- no reply from
|
||||
- overall HEALTH_
|
||||
- \(MON_DOWN\)
|
||||
- \(MGR_DOWN\)
|
||||
- \(OSDMAP_FLAGS\)
|
||||
- \(OSD_
|
||||
- \(PG_
|
||||
|
@ -131,8 +131,10 @@ def _rebuild_db(ctx, manager, cluster_name, mon, mon_id, keyring_path):
|
||||
mon.run(args=['sudo', '-u', 'ceph',
|
||||
'CEPH_ARGS=--no-mon-config',
|
||||
'ceph-monstore-tool', mon_store_dir,
|
||||
'rebuild', '--', '--keyring',
|
||||
keyring_path])
|
||||
'rebuild', '--',
|
||||
'--keyring', keyring_path,
|
||||
'--monmap', '/tmp/monmap',
|
||||
])
|
||||
|
||||
|
||||
def _revive_mons(manager, mons, recovered, keyring_path):
|
||||
@ -156,7 +158,8 @@ def _revive_mons(manager, mons, recovered, keyring_path):
|
||||
'--cluster', cluster,
|
||||
'--mkfs',
|
||||
'-i', m,
|
||||
'--keyring', keyring_path])
|
||||
'--keyring', keyring_path,
|
||||
'--monmap', '/tmp/monmap'])
|
||||
log.info('reviving mon.{0}'.format(m))
|
||||
manager.revive_mon(m)
|
||||
n_mons += 1
|
||||
@ -198,6 +201,10 @@ def task(ctx, config):
|
||||
|
||||
first_mon = teuthology.get_first_mon(ctx, config)
|
||||
(mon,) = ctx.cluster.only(first_mon).remotes.iterkeys()
|
||||
|
||||
# stash a monmap for later
|
||||
mon.run(args=['ceph', 'mon', 'getmap', '-o', '/tmp/monmap'])
|
||||
|
||||
manager = ceph_manager.CephManager(
|
||||
mon,
|
||||
ctx=ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user