Skip to content

Commit 5f064a5

Browse files
committed
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 <[email protected]>
1 parent b8db14c commit 5f064a5

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/test/cli/rbd/help.t

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
group info Show information about a group.
5252
group list (group ls) List rbd groups.
5353
group remove (group rm) Delete a group.
54-
group rename Rename a group within pool.
54+
group rename Rename a group within its pool or
55+
namespace.
5556
group snap create Make a snapshot of a group.
5657
group snap info Show information about a group snapshot.
5758
group snap list (... ls) List snapshots of a group.
@@ -133,7 +134,8 @@
133134
pool init Initialize pool for use by RBD.
134135
pool stats Display pool statistics.
135136
remove (rm) Delete an image.
136-
rename (mv) Rename image within pool.
137+
rename (mv) Rename an image within its pool or
138+
namespace.
137139
resize Resize (expand or shrink) image.
138140
snap create (snap add) Create a snapshot.
139141
snap limit clear Remove snapshot limit.
@@ -1034,7 +1036,7 @@
10341036
[--dest-group <dest-group>]
10351037
<source-group-spec> <dest-group-spec>
10361038

1037-
Rename a group within pool.
1039+
Rename a group within its pool or namespace.
10381040

10391041
Positional arguments
10401042
<source-group-spec> source group specification
@@ -2262,7 +2264,7 @@
22622264
[--dest-namespace <dest-namespace>] [--dest <dest>]
22632265
<source-image-spec> <dest-image-spec>
22642266

2265-
Rename image within pool.
2267+
Rename an image within its pool or namespace.
22662268

22672269
Positional arguments
22682270
<source-image-spec> source image specification

src/tools/rbd/action/Group.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ Shell::Action action_list(
10461046
{"group", "list"}, {"group", "ls"}, "List rbd groups.",
10471047
"", &get_list_arguments, &execute_list);
10481048
Shell::Action action_rename(
1049-
{"group", "rename"}, {}, "Rename a group within pool.",
1049+
{"group", "rename"}, {}, "Rename a group within its pool or namespace.",
10501050
"", &get_rename_arguments, &execute_rename);
10511051
Shell::Action action_info(
10521052
{"group", "info"}, {}, "Show information about a group.",

src/tools/rbd/action/Rename.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ int execute(const po::variables_map &vm,
8686
}
8787

8888
Shell::Action action(
89-
{"rename"}, {"mv"}, "Rename image within pool.", "", &get_arguments,
90-
&execute);
89+
{"rename"}, {"mv"}, "Rename an image within its pool or namespace.", "",
90+
&get_arguments, &execute);
9191

9292
} // namespace rename
9393
} // namespace action

0 commit comments

Comments
 (0)