ceph-csi/internal
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
..
cephfs cleanup: remove unwanted print 2022-03-11 05:40:32 +00:00
controller rbd: remove retrieving volumeHandle from PV annotation 2021-12-17 03:38:29 +00:00
csi-addons rbd: return unimplemented error for block-mode reclaimspace req 2022-03-03 19:00:49 +00:00
csi-common rbd: introduce a helper function to detect multi writer,block & rwofile 2022-01-11 19:40:22 +00:00
journal cleanup: remove unwanted type declaration 2022-01-24 05:25:11 +00:00
kms util: configure tenants vaultAuthNamespace if not set 2022-03-02 08:36:33 +00:00
liveness cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
rbd rbd: fix parsing mapOptions 2022-03-14 15:21:25 +00:00
util cephfs: detect corrupt ceph-fuse mounts and try to remount 2022-03-10 06:05:52 +00:00