From: Jason Dillaman Date: Thu, 5 Nov 2015 21:41:05 +0000 (-0500) Subject: rbd: don't print command help on error X-Git-Tag: v10.0.1~103^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b2f8363d02acd960062ec11f36cd18455764cd36;p=ceph.git rbd: don't print command help on error Signed-off-by: Jason Dillaman --- diff --git a/src/test/cli/rbd/invalid-snap-usage.t b/src/test/cli/rbd/invalid-snap-usage.t index bfe87254dc7a..9b8c59464613 100644 --- a/src/test/cli/rbd/invalid-snap-usage.t +++ b/src/test/cli/rbd/invalid-snap-usage.t @@ -1,772 +1,109 @@ $ rbd create foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd create [--pool ] [--image ] - [--image-format ] [--new-format] - [--order ] [--image-features ] - [--image-shared] [--stripe-unit ] - [--stripe-count ] --size - - - Create an empty image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --image-format arg image format [1 or 2] - --new-format use image format 2 - (deprecated) - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - -s [ --size ] arg image size (in M/G/T) - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd flatten foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd flatten [--pool ] [--image ] [--no-progress] - - - Fill clone with parent data (make it independent). - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd resize foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd resize [--pool ] [--image ] --size - [--allow-shrink] [--no-progress] - - - Resize (expand or shrink) image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - -s [ --size ] arg image size (in M/G/T) - --allow-shrink permit shrinking - --no-progress disable progress output - [22] $ rbd rm foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd remove [--pool ] [--image ] [--no-progress] - - - Delete an image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd import-diff /tmp/diff foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd import-diff [--path ] [--pool ] [--image ] - [--no-progress] - - - Import an incremental diff. - - Positional arguments - import file (or '-' for stdin) - image specification - (example: [/]) - - Optional arguments - --path arg import file (or '-' for stdin) - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd mv foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] $ rbd mv foo@snap bar rbd: snapname specified for a command that doesn't use it - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] $ rbd mv foo@snap bar@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] $ rbd image-meta list foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta list [--pool ] [--image ] - [--format ] [--pretty-format] - - - Image metadata list keys with values. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd image-meta get foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta get [--pool ] [--image ] - - - Image metadata get the value associated with the key. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta get foo@snap key rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta get [--pool ] [--image ] - - - Image metadata get the value associated with the key. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set foo@snap key rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set foo@snap key val rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta remove foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta remove [--pool ] [--image ] - - - Image metadata remove the key and value associated. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta remove foo@snap key rbd: snapname specified for a command that doesn't use it - - usage: rbd image-meta remove [--pool ] [--image ] - - - Image metadata remove the key and value associated. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd snap ls foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd snap ls [--pool ] [--image ] [--format ] - [--pretty-format] - - - Dump list of image snapshots. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd snap purge foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd snap purge [--pool ] [--image ] [--no-progress] - - - Deletes all snapshots. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd watch foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd watch [--pool ] [--image ] - - - Watch events on image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd status foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd status [--pool ] [--image ] [--format ] - [--pretty-format] - - - Show the status of this image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd feature disable foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd feature disable [--pool ] [--image ] - [ ...] - - Disable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature disable foo@snap layering rbd: snapname specified for a command that doesn't use it - - usage: rbd feature disable [--pool ] [--image ] - [ ...] - - Disable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature enable foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd feature enable [--pool ] [--image ] - [ ...] - - Enable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature enable foo@snap layering rbd: snapname specified for a command that doesn't use it - - usage: rbd feature enable [--pool ] [--image ] - [ ...] - - Enable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock list foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd lock list [--pool ] [--image ] [--format ] - [--pretty-format] - - - Show locks held on an image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd lock add foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd lock add [--pool ] [--image ] [--shared ] - - - Take a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --shared arg shared lock tag - [22] $ rbd lock add foo@snap id rbd: snapname specified for a command that doesn't use it - - usage: rbd lock add [--pool ] [--image ] [--shared ] - - - Take a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --shared arg shared lock tag - [22] $ rbd lock remove foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock remove foo@snap id rbd: snapname specified for a command that doesn't use it - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock remove foo@snap id client.1234 rbd: snapname specified for a command that doesn't use it - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd bench-write foo@snap rbd: snapname specified for a command that doesn't use it - - usage: rbd bench-write [--pool ] [--image ] [--io-size ] - [--io-threads ] [--io-total ] - [--io-pattern ] - - - Simple write benchmark. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --io-size arg write size (in B/K/M/G/T) - --io-threads arg ios in flight - --io-total arg total size to write (in B/K/M/G/T) - --io-pattern arg write pattern (rand or seq) - [22] $ rbd clone foo@snap bar@snap rbd: destination snapname specified for a command that doesn't use it - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd import /bin/ls ls@snap rbd: destination snapname specified for a command that doesn't use it - - usage: rbd import [--path ] [--dest-pool ] [--dest ] - [--image-format ] [--new-format] - [--order ] [--image-features ] - [--image-shared] [--stripe-unit ] - [--stripe-count ] [--no-progress] - [--pool ] [--image ] - - - Import image from file. - - Positional arguments - import file (or '-' for stdin) - destination image specification - (example: [/]) - - Optional arguments - --path arg import file (or '-' for stdin) - --dest-pool arg destination pool name - --dest arg destination image name - --image-format arg image format [1 or 2] - --new-format use image format 2 - (deprecated) - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - --no-progress disable progress output - -p [ --pool ] arg pool name (deprecated) - --image arg image name (deprecated) - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd cp foo bar@snap rbd: destination snapname specified for a command that doesn't use it - - usage: rbd copy [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--no-progress] - - - Copy src image to dest. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --no-progress disable progress output - [22] $ rbd cp foo@snap bar@snap rbd: destination snapname specified for a command that doesn't use it - - usage: rbd copy [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--no-progress] - - - Copy src image to dest. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --no-progress disable progress output - [22] $ rbd mv foo bar@snap rbd: destination snapname specified for a command that doesn't use it - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] diff --git a/src/test/cli/rbd/not-enough-args.t b/src/test/cli/rbd/not-enough-args.t index 84b52275e0fb..10283a3cd4be 100644 --- a/src/test/cli/rbd/not-enough-args.t +++ b/src/test/cli/rbd/not-enough-args.t @@ -1,1403 +1,192 @@ $ rbd info rbd: image name was not specified - - usage: rbd info [--pool ] [--image ] [--snap ] - [--format ] [--pretty-format] - - - Show information about image size, striping, etc. - - Positional arguments - image or snapshot specification - (example: [/][@]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd create rbd: image name was not specified - - usage: rbd create [--pool ] [--image ] - [--image-format ] [--new-format] - [--order ] [--image-features ] - [--image-shared] [--stripe-unit ] - [--stripe-count ] --size - - - Create an empty image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --image-format arg image format [1 or 2] - --new-format use image format 2 - (deprecated) - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - -s [ --size ] arg image size (in M/G/T) - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd clone rbd: image name was not specified - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd clone foo rbd: snap name was not specified - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd clone foo@snap rbd: destination image name was not specified - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd clone foo bar rbd: snap name was not specified - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd clone foo bar@snap rbd: snap name was not specified - - usage: rbd clone [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--order ] - [--image-features ] [--image-shared] - [--stripe-unit ] [--stripe-count ] - - - Clone a snapshot into a COW child image. - - Positional arguments - source snapshot specification - (example: [/]@) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd children rbd: image name was not specified - - usage: rbd children [--pool ] [--image ] [--snap ] - [--format ] [--pretty-format] - - - Display children of snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd children foo rbd: snap name was not specified - - usage: rbd children [--pool ] [--image ] [--snap ] - [--format ] [--pretty-format] - - - Display children of snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd flatten rbd: image name was not specified - - usage: rbd flatten [--pool ] [--image ] [--no-progress] - - - Fill clone with parent data (make it independent). - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd resize rbd: image name was not specified - - usage: rbd resize [--pool ] [--image ] --size - [--allow-shrink] [--no-progress] - - - Resize (expand or shrink) image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - -s [ --size ] arg image size (in M/G/T) - --allow-shrink permit shrinking - --no-progress disable progress output - [22] $ rbd rm rbd: image name was not specified - - usage: rbd remove [--pool ] [--image ] [--no-progress] - - - Delete an image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd export rbd: image name was not specified - - usage: rbd export [--pool ] [--image ] [--snap ] - [--path ] [--no-progress] - - - Export image to file. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - export file (or '-' for stdout) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --path arg export file (or '-' for stdout) - --no-progress disable progress output - [22] $ rbd import rbd: path was not specified - - usage: rbd import [--path ] [--dest-pool ] [--dest ] - [--image-format ] [--new-format] - [--order ] [--image-features ] - [--image-shared] [--stripe-unit ] - [--stripe-count ] [--no-progress] - [--pool ] [--image ] - - - Import image from file. - - Positional arguments - import file (or '-' for stdin) - destination image specification - (example: [/]) - - Optional arguments - --path arg import file (or '-' for stdin) - --dest-pool arg destination pool name - --dest arg destination image name - --image-format arg image format [1 or 2] - --new-format use image format 2 - (deprecated) - --order arg object order [12 <= order <= 25] - --image-features arg image features - [layering(+), striping(+), exclusive-lock(*), - object-map(*), fast-diff(*), deep-flatten] - --image-shared shared image - --stripe-unit arg stripe unit - --stripe-count arg stripe count - --no-progress disable progress output - -p [ --pool ] arg pool name (deprecated) - --image arg image name (deprecated) - - Image Features: - (*) supports enabling/disabling on existing images - (+) enabled by default for new images if features not specified - [22] $ rbd diff rbd: image name was not specified - - usage: rbd diff [--pool ] [--image ] [--snap ] - [--from-snap ] [--whole-object] [--format ] - [--pretty-format] - - - Print extents that differ since a previous snap, or image creation. - - Positional arguments - image or snapshot specification - (example: [/][@]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --from-snap arg snapshot starting point - --whole-object compare whole object - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd export-diff rbd: image name was not specified - - usage: rbd export-diff [--pool ] [--image ] [--snap ] - [--path ] [--from-snap ] - [--whole-object] [--no-progress] - - - Export incremental diff to file. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - export file (or '-' for stdout) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --path arg export file (or '-' for stdout) - --from-snap arg snapshot starting point - --whole-object compare whole object - --no-progress disable progress output - [22] $ rbd export-diff foo rbd: path was not specified - - usage: rbd export-diff [--pool ] [--image ] [--snap ] - [--path ] [--from-snap ] - [--whole-object] [--no-progress] - - - Export incremental diff to file. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - export file (or '-' for stdout) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --path arg export file (or '-' for stdout) - --from-snap arg snapshot starting point - --whole-object compare whole object - --no-progress disable progress output - [22] $ rbd export-diff foo@snap rbd: path was not specified - - usage: rbd export-diff [--pool ] [--image ] [--snap ] - [--path ] [--from-snap ] - [--whole-object] [--no-progress] - - - Export incremental diff to file. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - export file (or '-' for stdout) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --path arg export file (or '-' for stdout) - --from-snap arg snapshot starting point - --whole-object compare whole object - --no-progress disable progress output - [22] $ rbd merge-diff rbd: first diff was not specified - - usage: rbd merge-diff [--path ] [--no-progress] - - - Merge two diff exports together. - - Positional arguments - path to first diff (or '-' for stdin) - path to second diff - path to merged diff (or '-' for stdout) - - Optional arguments - --path arg path to merged diff (or '-' for stdout) - --no-progress disable progress output - [22] $ rbd merge-diff /tmp/diff1 rbd: second diff was not specified - - usage: rbd merge-diff [--path ] [--no-progress] - - - Merge two diff exports together. - - Positional arguments - path to first diff (or '-' for stdin) - path to second diff - path to merged diff (or '-' for stdout) - - Optional arguments - --path arg path to merged diff (or '-' for stdout) - --no-progress disable progress output - [22] $ rbd merge-diff /tmp/diff1 /tmp/diff2 rbd: path was not specified - - usage: rbd merge-diff [--path ] [--no-progress] - - - Merge two diff exports together. - - Positional arguments - path to first diff (or '-' for stdin) - path to second diff - path to merged diff (or '-' for stdout) - - Optional arguments - --path arg path to merged diff (or '-' for stdout) - --no-progress disable progress output - [22] $ rbd import-diff rbd: path was not specified - - usage: rbd import-diff [--path ] [--pool ] [--image ] - [--no-progress] - - - Import an incremental diff. - - Positional arguments - import file (or '-' for stdin) - image specification - (example: [/]) - - Optional arguments - --path arg import file (or '-' for stdin) - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd import-diff /tmp/diff rbd: image name was not specified - - usage: rbd import-diff [--path ] [--pool ] [--image ] - [--no-progress] - - - Import an incremental diff. - - Positional arguments - import file (or '-' for stdin) - image specification - (example: [/]) - - Optional arguments - --path arg import file (or '-' for stdin) - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd cp rbd: image name was not specified - - usage: rbd copy [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--no-progress] - - - Copy src image to dest. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --no-progress disable progress output - [22] $ rbd cp foo rbd: destination image name was not specified - - usage: rbd copy [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--no-progress] - - - Copy src image to dest. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --no-progress disable progress output - [22] $ rbd cp foo@snap rbd: destination image name was not specified - - usage: rbd copy [--pool ] [--image ] [--snap ] - [--dest-pool ] [--dest ] [--no-progress] - - - Copy src image to dest. - - Positional arguments - source image or snapshot specification - (example: - [/][@]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --snap arg source snapshot name - --dest-pool arg destination pool name - --dest arg destination image name - --no-progress disable progress output - [22] $ rbd mv rbd: image name was not specified - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] $ rbd mv foo rbd: destination image name was not specified - - usage: rbd rename [--pool ] [--image ] [--dest-pool ] - [--dest ] - - - Rename image within pool. - - Positional arguments - source image specification - (example: [/]) - destination image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg source pool name - --image arg source image name - --dest-pool arg destination pool name - --dest arg destination image name - [22] $ rbd image-meta list rbd: image name was not specified - - usage: rbd image-meta list [--pool ] [--image ] - [--format ] [--pretty-format] - - - Image metadata list keys with values. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd image-meta get rbd: image name was not specified - - usage: rbd image-meta get [--pool ] [--image ] - - - Image metadata get the value associated with the key. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta get foo rbd: metadata key was not specified - - usage: rbd image-meta get [--pool ] [--image ] - - - Image metadata get the value associated with the key. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set rbd: image name was not specified - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set foo rbd: metadata key was not specified - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta set foo key rbd: metadata value was not specified - - usage: rbd image-meta set [--pool ] [--image ] - - - Image metadata set key with value. - - Positional arguments - image specification - (example: [/]) - image meta key - image meta value - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta remove rbd: image name was not specified - - usage: rbd image-meta remove [--pool ] [--image ] - - - Image metadata remove the key and value associated. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd image-meta remove foo rbd: metadata key was not specified - - usage: rbd image-meta remove [--pool ] [--image ] - - - Image metadata remove the key and value associated. - - Positional arguments - image specification - (example: [/]) - image meta key - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd object-map rebuild rbd: image name was not specified - - usage: rbd object-map rebuild [--pool ] [--image ] - [--snap ] [--no-progress] - - - Rebuild an invalid object map. - - Positional arguments - image or snapshot specification - (example: [/][@]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --no-progress disable progress output - [22] $ rbd snap ls rbd: image name was not specified - - usage: rbd snap ls [--pool ] [--image ] [--format ] - [--pretty-format] - - - Dump list of image snapshots. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd snap create rbd: image name was not specified - - usage: rbd snap create [--pool ] [--image ] [--snap ] - - - Create a snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap create foo rbd: snap name was not specified - - usage: rbd snap create [--pool ] [--image ] [--snap ] - - - Create a snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap rollback rbd: image name was not specified - - usage: rbd snap rollback [--pool ] [--image ] [--snap ] - [--no-progress] - - - Rollback image to snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --no-progress disable progress output - [22] $ rbd snap rollback foo rbd: snap name was not specified - - usage: rbd snap rollback [--pool ] [--image ] [--snap ] - [--no-progress] - - - Rollback image to snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - --no-progress disable progress output - [22] $ rbd snap rm rbd: image name was not specified - - usage: rbd snap remove [--pool ] [--image ] [--snap ] - - - Deletes a snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap rm foo rbd: snap name was not specified - - usage: rbd snap remove [--pool ] [--image ] [--snap ] - - - Deletes a snapshot. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap purge rbd: image name was not specified - - usage: rbd snap purge [--pool ] [--image ] [--no-progress] - - - Deletes all snapshots. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --no-progress disable progress output - [22] $ rbd snap protect rbd: image name was not specified - - usage: rbd snap protect [--pool ] [--image ] [--snap ] - - - Prevent a snapshot from being deleted. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap protect foo rbd: snap name was not specified - - usage: rbd snap protect [--pool ] [--image ] [--snap ] - - - Prevent a snapshot from being deleted. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap unprotect rbd: image name was not specified - - usage: rbd snap unprotect [--pool ] [--image ] [--snap ] - - - Allow a snapshot to be deleted. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd snap unprotect foo rbd: snap name was not specified - - usage: rbd snap unprotect [--pool ] [--image ] [--snap ] - - - Allow a snapshot to be deleted. - - Positional arguments - snapshot specification - (example: [/]@) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd watch rbd: image name was not specified - - usage: rbd watch [--pool ] [--image ] - - - Watch events on image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd status rbd: image name was not specified - - usage: rbd status [--pool ] [--image ] [--format ] - [--pretty-format] - - - Show the status of this image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd map rbd: image name was not specified - - usage: rbd map [--pool ] [--image ] [--snap ] - [--options ] [--read-only] - - - Map image to a block device using the kernel. - - Positional arguments - image or snapshot specification - (example: [/][@]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - -o [ --options ] arg mapping options - --read-only mount read-only - [22] $ rbd unmap rbd: unmap requires either image name or device path - - usage: rbd unmap [--pool ] [--image ] [--snap ] - - - Unmap a rbd device that was used by the kernel. - - Positional arguments - image, snapshot, or device specification - [/][@] - or - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --snap arg snapshot name - [22] $ rbd feature disable rbd: image name was not specified - - usage: rbd feature disable [--pool ] [--image ] - [ ...] - - Disable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature disable foo rbd: at least one feature name must be specified - - usage: rbd feature disable [--pool ] [--image ] - [ ...] - - Disable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature enable rbd: image name was not specified - - usage: rbd feature enable [--pool ] [--image ] - [ ...] - - Enable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd feature enable foo rbd: at least one feature name must be specified - - usage: rbd feature enable [--pool ] [--image ] - [ ...] - - Enable the specified image feature. - - Positional arguments - image specification - (example: [/]) - image features - [layering, striping, exclusive-lock, object-map, - fast-diff, deep-flatten] - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock list rbd: image name was not specified - - usage: rbd lock list [--pool ] [--image ] [--format ] - [--pretty-format] - - - Show locks held on an image. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --format arg output format [plain, json, or xml] - --pretty-format pretty formatting (json and xml) - [22] $ rbd lock add rbd: image name was not specified - - usage: rbd lock add [--pool ] [--image ] [--shared ] - - - Take a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --shared arg shared lock tag - [22] $ rbd lock add foo rbd: lock id was not specified - - usage: rbd lock add [--pool ] [--image ] [--shared ] - - - Take a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --shared arg shared lock tag - [22] $ rbd lock remove rbd: image name was not specified - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock remove foo rbd: lock id was not specified - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd lock remove foo id rbd: locker was not specified - - usage: rbd lock remove [--pool ] [--image ] - - - Release a lock on an image. - - Positional arguments - image specification - (example: [/]) - unique lock id - locker client - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - [22] $ rbd bench-write rbd: image name was not specified - - usage: rbd bench-write [--pool ] [--image ] [--io-size ] - [--io-threads ] [--io-total ] - [--io-pattern ] - - - Simple write benchmark. - - Positional arguments - image specification - (example: [/]) - - Optional arguments - -p [ --pool ] arg pool name - --image arg image name - --io-size arg write size (in B/K/M/G/T) - --io-threads arg ios in flight - --io-total arg total size to write (in B/K/M/G/T) - --io-pattern arg write pattern (rand or seq) - [22] diff --git a/src/tools/rbd/Shell.cc b/src/tools/rbd/Shell.cc index c82d80d607bd..ce5a052a867a 100644 --- a/src/tools/rbd/Shell.cc +++ b/src/tools/rbd/Shell.cc @@ -132,10 +132,6 @@ int Shell::execute(int arg_count, const char **arg_values) { } int r = (*action->execute)(vm); - if (r == -EINVAL) { - std::cout << std::endl; - print_action_help(app_name, action); - } if (r != 0) { return std::abs(r); }