ceph-csi/internal/csi-common
Humble Chirammal 4a69378698 rbd: introduce a helper function to detect multi writer,block & rwofile
SINGLE_NODE_WRITER capability ambiguity has been fixed in csi spec v1.5
which allows the SP drivers to declare more granular WRITE capability in form
of SINGLE_NODE_SINGLE_WRITER or SINGLE_NODE_MULTI_WRITER.

These are not really new capabilities rather capabilities introduced to
get the desired functionality from CO side based on the capabilities SP
driver support for various CSI operations, this new capabilities also help
to address new access mode RWOP (readwriteoncepod).

This commit adds a helper function which identity the request is of
multiwriter mode and also validates whether it is filesystem mode or
block mode. Based on the inspection it fails to allow multi write
requests for filesystem mode and only allow multi write request against
block mode.

This commit also adds unit tests for isMultiWriterBlock function which
validates various accesstypes and accessmodes.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-11 19:40:22 +00:00
..
controllerserver-default.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
driver.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
identityserver-default.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
nodeserver-default.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
server.go cleanup: refactor gRPC middleware into NewMiddlewareServerOption 2021-12-23 17:43:23 +00:00
utils_test.go rbd: introduce a helper function to detect multi writer,block & rwofile 2022-01-11 19:40:22 +00:00
utils.go rbd: introduce a helper function to detect multi writer,block & rwofile 2022-01-11 19:40:22 +00:00