]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
igw: fix image removal during purge v3.1.0rc13
authorMike Christie <mchristi@redhat.com>
Wed, 25 Jul 2018 18:13:17 +0000 (13:13 -0500)
committerSébastien Han <seb@redhat.com>
Tue, 31 Jul 2018 08:09:08 +0000 (10:09 +0200)
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: Mike Christie <mchristi@redhat.com>
(cherry picked from commit d572a9a6020592607d98aa30cea75940428506b0)

library/igw_purge.py
roles/ceph-iscsi-gw/library/igw_purge.py

index 1860690ed1c355953f6f948aeb9de9ecc2804479..4e29ddc47fe61db35e63bce3a8cc4c3019d84b5f 100644 (file)
@@ -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:
index 1860690ed1c355953f6f948aeb9de9ecc2804479..4e29ddc47fe61db35e63bce3a8cc4c3019d84b5f 100644 (file)
@@ -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: