Commit 99f84f88 authored by Mike Christie's avatar Mike Christie Committed by Sébastien Han
Browse files

igw: fix image removal during purge

We were not passing in the ceph conf info into the rbd image removal
command, so if the clustername was not the default igw purge would fail
due to the rbd rm command failing.

This just fixes the bug by passing in the ceph conf info which has the
clustername to use.

This fixes Red Hat bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1601949

Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
(cherry picked from commit d572a9a6)
parent f3f734f8
......@@ -70,7 +70,8 @@ def delete_group(module, image_list, cfg):
def delete_rbd(module, rbd_path):
logger.debug("issuing delete for {}".format(rbd_path))
rm_cmd = 'rbd --no-progress rm {}'.format(rbd_path)
rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf,
rbd_path)
rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True)
logger.debug("delete RC = {}, {}".format(rc, rm_out, err))
if rc != 0:
......
......@@ -70,7 +70,8 @@ def delete_group(module, image_list, cfg):
def delete_rbd(module, rbd_path):
logger.debug("issuing delete for {}".format(rbd_path))
rm_cmd = 'rbd --no-progress rm {}'.format(rbd_path)
rm_cmd = 'rbd --no-progress --conf {} rm {}'.format(settings.config.cephconf,
rbd_path)
rc, rm_out, err = module.run_command(rm_cmd, use_unsafe_shell=True)
logger.debug("delete RC = {}, {}".format(rc, rm_out, err))
if rc != 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment