]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: "trash remove" takes image_id_spec, not image_spec
authorIlya Dryomov <idryomov@gmail.com>
Fri, 28 Jan 2022 22:01:08 +0000 (23:01 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 29 Jan 2022 14:10:33 +0000 (15:10 +0100)
Because of @CLIWriteCommand, the parameter name has to adhere to
the mon command API.  Commit dcb51b067a49 ("mgr/rbd_support: define
commands using CLICommand") accidentally changed image_id_spec to
image_spec, breaking external users such as go-ceph.

Fixes: https://tracker.ceph.com/issues/54057
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/pybind/mgr/rbd_support/module.py

index 2b29b1f1a74a7172dd444759e7d04a908e4c8359..7e908c8235e1790d28dcb94afe8fa5c271f94eef 100644 (file)
@@ -169,12 +169,12 @@ class Module(MgrModule):
 
     @CLIWriteCommand('rbd task add trash remove')
     @with_latest_osdmap
-    def task_add_trash_remove(self, image_spec: str) -> Tuple[int, str, str]:
+    def task_add_trash_remove(self, image_id_spec: str) -> Tuple[int, str, str]:
         """
         Remove an image from the trash asynchronously in the background
         """
         with self.task.lock:
-            return self.task.queue_trash_remove(image_spec)
+            return self.task.queue_trash_remove(image_id_spec)
 
     @CLIWriteCommand('rbd task add migration execute')
     @with_latest_osdmap