From: Ilya Dryomov Date: Tue, 27 Aug 2024 18:34:31 +0000 (+0200) Subject: rbd: clarify "rbd {group,} rename" command description X-Git-Tag: v18.2.5~411^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=803e246f91c32a3c7ec26090fc59c1faeff03f31;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 4e9b0cc1d7d8e..a2d7e0013901b 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. @@ -130,7 +131,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. @@ -1011,7 +1013,7 @@ [--dest-group ] - Rename a group within pool. + Rename a group within its pool or namespace. Positional arguments source group specification @@ -2218,7 +2220,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 5c2232a6fc68f..5658103936a28 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 b4954bcbb90af..db198d656e2b6 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