Closed chrishenzie closed 3 years ago
@bswartz Would you be able to take a look at this? Thank you!
/lgtm
lgtm
thanks for putting this together, looking now..
@jdef @humblec @gnufied PTAL
I'd like to merge and cut the next release on Monday.
@jdef Done, addressed comments. Thank you for the review!
lgtm from end. Thanks :+1:
LGTM mod comments
lgtm from end. Thanks 👍
Thanks folks. Mergining this PR.
Access Modes
In the CSI spec there are conflicting definitions of the
SINGLE_NODE_WRITER
access mode. By definition,SINGLE_NODE_WRITER
means "Can only be published once as read/write on a single node, at any given time." The problem is how this access mode is used duringNodePublishVolume
, which is typically where volume mounting is performed.The CSI spec defines that when
NodePublishVolume
is called a second time for a volume with a non-MULTI_NODE
access mode and with a different target path, the plugin should returnFAILED_PRECONDITION
. For CSI plugins that strictly adhere to the spec, this guarantees that a volume can only be mounted to a single target path, which meansSINGLE_NODE_WRITER
restricts access to a single pod on a single node. This behavior conflicts with the original definition. Due to this conflict, we do not have an access mode that represents multiple writers on the same node. See https://github.com/container-storage-interface/spec/issues/465#issuecomment-739046063 for more details.The proposed solution for this issue is to introduce two new access modes:
SINGLE_NODE_SINGLE_WRITER
andSINGLE_NODE_MULTI_WRITER
. These access modes exist to replaceSINGLE_NODE_WRITER
and disambiguate the number of writers on a single node.Capabilities
Included in this change are capability bits in the controller and node services to indicate that a driver understands these new access modes. This approach was chosen in order to preserve backwards compatibility. When a client calls a CSI driver that supports the
SINGLE_NODE_MULTI_WRITER
capability, the client should replace any uses of theSINGLE_NODE_WRITER
access mode with the appropriateSINGLE_NODE_{SINGLE,MULTI}_WRITER
access mode depending on their use case.