]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd: add missing switch arguments for recognition by get_command_spec()
authorIlya Dryomov <idryomov@gmail.com>
Wed, 19 Jan 2022 11:54:23 +0000 (12:54 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 27 Jan 2022 20:28:35 +0000 (21:28 +0100)
commitbcb5a172cd29bb1ee610aadbf1e121450411a17b
tree1b26868a0729bdd977651269e7a4793c4125411e
parent4a099a4756993d30782f47627f7b2fe9ce97ca85
rbd: add missing switch arguments for recognition by get_command_spec()

Currently this

  $ rbd --all children img

doesn't work, while this

  $ rbd children --all img

or this

  $ rbd children img --all

does.  The issue is that -a/--all isn't on the list of known switch
arguments.  The "rbd children" example may seem contrived but for more
complicated commands such as "rbd device map" mixing switches and
positional arguments occurs naturally:

  $ rbd device --device-type nbd --options try-netlink --show-cookie map img

Fixes: https://tracker.ceph.com/issues/53935
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit e1b4811bc324236892e43a6bb841d6278fe1584e)
src/tools/rbd/ArgumentTypes.h
src/tools/rbd/action/Children.cc
src/tools/rbd/action/Device.cc
src/tools/rbd/action/Diff.cc
src/tools/rbd/action/Export.cc
src/tools/rbd/action/Migration.cc
src/tools/rbd/action/Nbd.cc
src/tools/rbd/action/Trash.cc
src/tools/rbd/action/TrashPurgeSchedule.cc
src/tools/rbd/action/Wnbd.cc