Condition to reproduce issue:
- In swarm mode
- volume mounted on remote node and not in use by node or container.
- remote node silently did not unmount the volume.
- try mounting the volume locally node.
- plugin fails to mount with "failed to attach volume.. already attached"
Cause:
- plugin tries to attach the volume while it is already associated to another node
Fix:
- submit detach request if volume already associated with another node.
- Kernel unmounts volume when detach request is made.