ceph-csi/internal/rbd
Prasanna Kumar Kalever 3eb0fa5e21 rbd: fix parsing mapOptions
Currently, we support

mapOption: "krbd:v1,v2,v3;nbd:v1,v2,v3"

- By omitting `krbd:` or `nbd:`, the option(s) apply to
  rbdDefaultMounter which is krbd.
- A user can _override_ the options for a mounter by specifying `krbd:`
  or `nbd:`.
  mapOption: "v1,v2,v3;nbd:v1,v2,v3"
  is effectively the same as the 1st example.
- Sections are split by `;`.
- If users want to specify common options for both `krbd` and `nbd`,
  they should mention them twice.

But in case if the krbd or nbd specifc options contian `:` within them,
then the parsing is failing now.

E0301 10:19:13.615111 7348 utils.go:200] ID: 63 Req-ID:
0001-0009-rook-ceph-0000000000000001-fd37c41b-9948-11ec-ad32-0242ac110004
GRPC error: badly formatted map/unmap options:
"krbd:read_from_replica=localize,crush_location=zone:zone1;"

This patch fix the above case where the options itself contain `:`
delimitor
ex: krbd:v1,v2,v3=v31:v32;nbd:v1,v2,v3"

Please note, if you are using such options which contain `:` delimiter,
then it is mandatory to specify the mounter-type.

Fixes: #2910
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-03-14 15:21:25 +00:00
..
driver rbd: add SINGLE_NODE{SINGLE_MULTI}_WRITER capabilities 2022-01-11 19:40:22 +00:00
clone.go cleanup: remove thick provisioning code 2022-01-28 11:17:15 +00:00
controllerserver.go rbd: make image features as optional parameter 2022-02-28 13:10:03 +00:00
diskusage.go rbd: implement CSI-Addons ControllerReclaimSpace 2021-12-23 17:43:23 +00:00
encryption.go rbd: modify copyEncryptionConfig to accept copyOnlyPassphrase arg 2021-10-05 07:46:57 +00:00
errors.go rbd: check local image state during promote operation 2021-12-01 20:19:05 +00:00
globals.go rbd: add functions for initializing global variables 2021-12-10 07:35:26 +00:00
identityserver.go internal: reformat long lines in internal/rbd package to 120 chars 2021-06-28 14:43:49 +00:00
migration_test.go rbd: change iteration variable name in the migration test to be specific 2021-10-11 10:06:30 +00:00
migration.go rbd: remove redundant util.Credentials arg from flattenRbdImage() 2022-01-06 12:28:18 +00:00
mirror.go rbd: add workaround for force promote 2021-12-23 13:36:21 +00:00
nodeserver_test.go cleanup: generalize the parseBool function 2021-11-01 08:17:36 +00:00
nodeserver.go rbd: make image features as optional parameter 2022-02-28 13:10:03 +00:00
rbd_attach_test.go rbd: fix parsing mapOptions 2022-03-14 15:21:25 +00:00
rbd_attach.go rbd: fix parsing mapOptions 2022-03-14 15:21:25 +00:00
rbd_healer.go rbd: export RunVolumeHealer() so that rbd/driver can start it 2021-12-10 07:35:26 +00:00
rbd_journal.go rbd: remove SizeBytes from rbdSnapshot struct 2021-12-23 03:47:00 +00:00
rbd_util_test.go rbd: make image features as optional parameter 2022-02-28 13:10:03 +00:00
rbd_util.go rbd: make image features as optional parameter 2022-02-28 13:10:03 +00:00
replicationcontrollerserver_test.go rbd: enabe journal based mirroring 2021-12-01 14:12:30 +00:00
replicationcontrollerserver.go rbd: remove redundant util.Credentials arg from flattenRbdImage() 2022-01-06 12:28:18 +00:00
snapshot.go rbd: remove redundant util.Credentials arg from flattenRbdImage() 2022-01-06 12:28:18 +00:00