Hi!
I'm a CSI plugin developer of a storage vendor. I had questions about NodePublishVolume recently, wish to get some opinions or guidances from you. Thanks.
The spec said that the CO SHALL ensure uniqueness of target_path per volume, in the other hand the spec indicated the NodePublishVolume MAY be called by the CO multiple times on the same node for the same volume with possibly DIFFERENT target_path and/or other arguments if the volume has MULTI_NODE capability. So I wonder:
If Non MULTI_NODE, should I check whether T1==T2? or T1==T2 should be guaranteed by CO? The FAILED_PRECONDITION actually exists in the grpc's status codes, so I don't know if T1==T2 would happen. What's more, checking target_paths seems to require a stateful plugin while we PREFER Deployment to StatefulSet with kubernetes. Are there any other ways to verify these infos gracefully? (maybe save these infos in staging_target_path?)
My 2 cents - CO will most likely not issue additional NodePublishVolume if Non MULTI_NODE for the same volume with a different path. But if the CO has a bug, loses state, etc. it could happen.
So such a check is not critical, but nice to have, so it's up to you on how robust you want to make your plugin to unexpected input.
Respectfully