]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rbd: add missing switch arguments for recognition by get_command_spec() 44741/head
authorIlya Dryomov <idryomov@gmail.com>
Wed, 19 Jan 2022 11:54:23 +0000 (12:54 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 22 Jan 2022 10:10:51 +0000 (11:10 +0100)
commitd72afdfcbf3bac34238eb0f1d6825dcbc5854506
treea07e79925fcb98c960a9f42b7ef875556a208fde
parent4d29e4caec1870b870492d17110d34996b9335e6
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)

Conflicts:
src/tools/rbd/ArgumentTypes.h [ snapshot quiesce support
  not in octopus ]
src/tools/rbd/action/Device.cc [ nbd cookie support not in
  octopus ]
src/tools/rbd/action/Migration.cc [ import-only migration
  not supported in octopus ]
src/tools/rbd/action/Wnbd.cc [ wnbd support not in octopus ]
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/Nbd.cc
src/tools/rbd/action/Trash.cc
src/tools/rbd/action/TrashPurgeSchedule.cc