Fix skip_zap_flag anomaly and add crush rm

This commit is contained in:
Joshua Boniface 2023-11-03 02:34:01 -04:00
parent 20497cf89d
commit 94d8d2cf75
1 changed files with 22 additions and 11 deletions

View File

@ -860,7 +860,18 @@ class CephOSDInstance(object):
else: else:
raise Exception raise Exception
if not skip_zap_flag: retcode, stdout, stderr = common.run_os_command(
f"ceph osd crush rm osd.{osd_id}"
)
if retcode:
print("ceph osd crush rm")
print(stdout)
print(stderr)
if force_flag:
logger.out("Ignoring error due to force flag", state="i")
else:
raise Exception
# 7. Remove the DB device # 7. Remove the DB device
if zkhandler.exists(("osd.db_device", osd_id)): if zkhandler.exists(("osd.db_device", osd_id)):
db_device = zkhandler.read(("osd.db_device", osd_id)) db_device = zkhandler.read(("osd.db_device", osd_id))