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:
James Page
2012-10-15 11:13:36 +01:00
parent 9379c31404
commit cdf09477ab
2 changed files with 27 additions and 13 deletions

View File

@@ -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 = [