Project

General

Profile

Actions

Bug #4243

closed

rbd cli: usage confusing for snapshot operations

Added by Alex Elder about 11 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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#     
Actions #1

Updated by Ian Colle about 11 years ago

  • Assignee set to Dan Mick
Actions #2

Updated by Dan Mick about 11 years ago

  • Assignee changed from Dan Mick to Josh Durgin
Actions #3

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
Actions #4

Updated by Josh Durgin about 9 years ago

  • Assignee deleted (Josh Durgin)
Actions #5

Updated by Vikhyat Umrao almost 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Vikhyat Umrao
  • Regression set to No
Actions #7

Updated by Vikhyat Umrao almost 9 years ago

  • Status changed from In Progress to Fix Under Review
Actions #8

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.
Actions #9

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

Actions #10

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.

Actions #11

Updated by Josh Durgin over 8 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF