I have 2 nodes node A and node B
Pod-test that has a PVC mount is running in node A, so essentially it has a lets say VA-node-A
Correct me if my assumption is wrong
If I move a Pod-test away from node A to node B, this will create a new VA-node-B
So now I have 2 VAs, VA-node-A and VA-node-B, there will be a syncDetach on VA-node-A and syncAttach on VA-node-B
This sync operations call ControllerPublishVolume and ControllerUnpublishVolume, via grpc to the csi plugin
So in this scenario, the 2 controllers will try to reconcile their respective VAs, problem here is, both VAs, have the same storage, and the two controllers, will keep acting on the storage simultaneously.
If users of the external-attacher are not really careful this will make them easily introduce race conditions for the 2 controllers, one scenario is if their api, accepts link and unlink storages, and you need to keep polling status to know if storage has been linked or unlinked
Not an expert in the external attacher code, but do you think it makes sense to delay creating the VA-node-B till the VA-node-A has been unlinked successfully? in other words and essentially just, prevent the two sync operations from acting on the same storage at the same time ?
If we cant, them maybe makes sense to make this as explicit as possible for users, so they know and do the right thing, maybe in docs or somewhere else?
But i think this is just how the external attacher works, preventing this race condition is simply a responsibility of the csi plugin?
I have 2 nodes node A and node B
Pod-test that has a PVC mount is running in node A, so essentially it has a lets say
VA-node-ACorrect me if my assumption is wrong
If I move a Pod-test away from node A to node B, this will create a new
VA-node-BSo now I have 2 VAs,
VA-node-AandVA-node-B, there will be asyncDetachonVA-node-AandsyncAttachonVA-node-BThis sync operations call
ControllerPublishVolumeandControllerUnpublishVolume, via grpc to the csi pluginSo in this scenario, the 2 controllers will try to reconcile their respective VAs, problem here is, both VAs, have the same storage, and the two controllers, will keep acting on the storage simultaneously.
If users of the external-attacher are not really careful this will make them easily introduce race conditions for the 2 controllers, one scenario is if their api, accepts link and unlink storages, and you need to keep polling status to know if storage has been linked or unlinked
Not an expert in the external attacher code, but do you think it makes sense to delay creating the
VA-node-Btill theVA-node-Ahas been unlinked successfully? in other words and essentially just, prevent the two sync operations from acting on the same storage at the same time ?If we cant, them maybe makes sense to make this as explicit as possible for users, so they know and do the right thing, maybe in docs or somewhere else?
But i think this is just how the external attacher works, preventing this race condition is simply a responsibility of the csi plugin?