Bug #4243
closedrbd cli: usage confusing for snapshot operations
0%
Description
The correct usage for creating a snapshot seems to be:
rbd snap create --snap=<snap_name> <image_name>
But the help message says:
snap create <snap-name> create a snapshot
Also, how about creating a nice "help" command. I.e.,
"rbd help" ought to do what "rbd --help" currently does,
and "rbd help snap" might give you help limited to the
snapshot command. As an added bonus, "rbd snap help"
might provide exactly the same thing (and work for all
commands, though I suspect that's more work...).
root@plana92:/tmp/cephtest# rbd --version ceph version 0.57-404-g8c05af5 (8c05af5dc3c398dda4c196a64f344db7ea69d209) root@plana92:/tmp/cephtest# rbd help rbd: error parsing command 'help' root@plana92:/tmp/cephtest# rbd --help usage: rbd [-n <auth user>] [OPTIONS] <cmd> ... where 'pool' is a rados pool name (default is 'rbd') and 'cmd' is one of: (ls | list) [-l | --long ] [pool-name] list rbd images ... snap create <snap-name> create a snapshot ... root@plana92:/tmp/cephtest#
Updated by Dan Mick about 11 years ago
- Assignee changed from Dan Mick to Josh Durgin
Updated by Josh Durgin almost 11 years ago
- Subject changed from rbd cli: usage wrong for snap create to rbd cli: usage confusing for snapshot operations
Updated by Vikhyat Umrao almost 9 years ago
- Status changed from New to In Progress
- Assignee set to Vikhyat Umrao
- Regression set to No
Updated by Vikhyat Umrao almost 9 years ago
Pull request : https://github.com/ceph/ceph/pull/5034
Updated by Vikhyat Umrao almost 9 years ago
- Status changed from In Progress to Fix Under Review
Updated by Jason Dillaman almost 9 years ago
Just a note: the rbd CLI help message includes the following:
<image-name>, <snap-name> are [pool/]name[@snap], or you may specify individual pieces of names with -p/--pool, --image, and/or --snap.
Updated by Vikhyat Umrao almost 9 years ago
Jason Dillaman wrote:
Just a note: the rbd CLI help message includes the following:
[...]
Thanks Jason for your inputs , could you please review this patch.
Yes we do have in rbd -h or rbd --help this output but some times user/admin misses it while they just run a single command for example :
rbd snap create <snapname>
and once you run this command with snapname it fails with imagename is missing which is a wrong message as we need --snap with snapname also with image name.
Then i have changed it so now it says :
rbd snap create requires image and snap name.
Thanks and Regards,
Vikhyat
Updated by Ilya Dryomov over 8 years ago
The now merged https://github.com/ceph/ceph/pull/5352 fixes the usage part. As for the dedicated help messages, I don't think it's worth it: our commands are pretty simple, unlike, say, git commands, each with a dedicated help and man page. rbd man page should be consulted for all the details, and if something is missing there, it should be added there.
Updated by Josh Durgin over 8 years ago
- Status changed from Fix Under Review to Resolved