Update bootstrap handling to ensure key and fsid are present before
trying to init and start OSD devices. Refactor osd device rescanning into ceph package.
This commit is contained in:
@@ -72,9 +72,22 @@ def is_osd_disk(dev):
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
def rescan_osd_devices():
|
||||
cmd = [
|
||||
'udevadm', 'trigger',
|
||||
'--subsystem-match=block', '--action=add'
|
||||
]
|
||||
|
||||
subprocess.call(cmd)
|
||||
|
||||
_bootstrap_keyring = "/var/lib/ceph/bootstrap-osd/ceph.keyring"
|
||||
|
||||
|
||||
def is_bootstrapped():
|
||||
return os.path.exists(_bootstrap_keyring)
|
||||
|
||||
|
||||
def import_osd_bootstrap_key(key):
|
||||
if not os.path.exists(_bootstrap_keyring):
|
||||
cmd = [
|
||||
|
||||
Reference in New Issue
Block a user