Refactor OSD bootstrap code into ceph-osd charm directly

This has been added to charm-ceph-osd in https://review.opendev.org/#/c/677693/3

Change-Id: I7d1ab2b1b6ca2c8ff4f9b52ab4304261ac647239
This commit is contained in:
Chris MacNaughton 2019-08-21 12:22:33 +02:00
parent bcfa45b762
commit cf0131d0bf
1 changed files with 0 additions and 32 deletions

View File

@ -952,8 +952,6 @@ def rescan_osd_devices():
udevadm_settle()
_client_admin_keyring = '/etc/ceph/ceph.client.admin.keyring'
_bootstrap_keyring = "/var/lib/ceph/bootstrap-osd/ceph.keyring"
_upgrade_keyring = "/var/lib/ceph/osd/ceph.client.osd-upgrade.keyring"
def is_bootstrapped():
@ -965,36 +963,6 @@ def wait_for_bootstrap():
time.sleep(3)
def import_osd_bootstrap_key(key):
if not os.path.exists(_bootstrap_keyring):
cmd = [
"sudo",
"-u",
ceph_user(),
'ceph-authtool',
_bootstrap_keyring,
'--create-keyring',
'--name=client.bootstrap-osd',
'--add-key={}'.format(key)
]
subprocess.check_call(cmd)
def import_osd_upgrade_key(key):
if not os.path.exists(_upgrade_keyring):
cmd = [
"sudo",
"-u",
ceph_user(),
'ceph-authtool',
_upgrade_keyring,
'--create-keyring',
'--name=client.osd-upgrade',
'--add-key={}'.format(key)
]
subprocess.check_call(cmd)
def generate_monitor_secret():
cmd = [
'ceph-authtool',