Skip to content

VA behavior when a pod is moved to another node #698

@Bash-mocart

Description

@Bash-mocart

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions