From: Ilya Dryomov Date: Tue, 27 Aug 2024 18:34:31 +0000 (+0200) Subject: rbd: clarify "rbd {group,} rename" command description X-Git-Tag: v19.2.1~248^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b74f65fbb0108362bc0c383b9308edffca45a82b;p=ceph.git rbd: clarify "rbd {group,} rename" command description Make it clearer that, despite a full image or group spec being taken for source and destination, an image or a group can be renamed only within its pool or namespace. Rename across pools or namespaces within the same pool is unsupported. Fixes: https://tracker.ceph.com/issues/67752 Signed-off-by: Ilya Dryomov (cherry picked from commit 5f064a52707af58fd6007734a768899aeb5a32fc) --- diff --git a/src/test/cli/rbd/help.t b/src/test/cli/rbd/help.t index 5a51199d32c4..09c9d5cde083 100644 --- a/src/test/cli/rbd/help.t +++ b/src/test/cli/rbd/help.t @@ -50,7 +50,8 @@ group image remove (... rm) Remove an image from a group. group list (group ls) List rbd groups. group remove (group rm) Delete a group. - group rename Rename a group within pool. + group rename Rename a group within its pool or + namespace. group snap create Make a snapshot of a group. group snap list (... ls) List snapshots of a group. group snap remove (... rm) Remove a snapshot from a group. @@ -131,7 +132,8 @@ pool init Initialize pool for use by RBD. pool stats Display pool statistics. remove (rm) Delete an image. - rename (mv) Rename image within pool. + rename (mv) Rename an image within its pool or + namespace. resize Resize (expand or shrink) image. snap create (snap add) Create a snapshot. snap limit clear Remove snapshot limit. @@ -1014,7 +1016,7 @@ [--dest-group ] - Rename a group within pool. + Rename a group within its pool or namespace. Positional arguments source group specification @@ -2221,7 +2223,7 @@ [--dest-namespace ] [--dest ] - Rename image within pool. + Rename an image within its pool or namespace. Positional arguments source image specification diff --git a/src/tools/rbd/action/Group.cc b/src/tools/rbd/action/Group.cc index 5c2232a6fc68..5658103936a2 100644 --- a/src/tools/rbd/action/Group.cc +++ b/src/tools/rbd/action/Group.cc @@ -875,7 +875,7 @@ Shell::Action action_list( {"group", "list"}, {"group", "ls"}, "List rbd groups.", "", &get_list_arguments, &execute_list); Shell::Action action_rename( - {"group", "rename"}, {}, "Rename a group within pool.", + {"group", "rename"}, {}, "Rename a group within its pool or namespace.", "", &get_rename_arguments, &execute_rename); Shell::Action action_add( {"group", "image", "add"}, {}, "Add an image to a group.", diff --git a/src/tools/rbd/action/Rename.cc b/src/tools/rbd/action/Rename.cc index b4954bcbb90a..db198d656e2b 100644 --- a/src/tools/rbd/action/Rename.cc +++ b/src/tools/rbd/action/Rename.cc @@ -86,8 +86,8 @@ int execute(const po::variables_map &vm, } Shell::Action action( - {"rename"}, {"mv"}, "Rename image within pool.", "", &get_arguments, - &execute); + {"rename"}, {"mv"}, "Rename an image within its pool or namespace.", "", + &get_arguments, &execute); } // namespace rename } // namespace action