• Kubernetes Submit Queue's avatar
    Merge pull request #56288 from jsafrane/multiattach-pods · 7de1a8e0
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Add list of pods that use a volume to multiattach events
    
    So users knows what pods are blocking a volume and can realize their error.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    
    UX:
    * User can get one of following events, depending what other pod(s) are already using a volume and in which namespace they are:
    ```
    Multi-Attach error for volume"volume-name" Volume is already exclusively attached to one node and can't be attached to another
    Multi-Attach error for volume "volume-name" Volume is already used by pod(s) pod3 and 1 pod(s) in different namespaces
    ```
    
    * controller-manager gets always full logs:
      * When the node where is the volume attached is known:
            ```
            Multi-Attach error for volume "volume-name" (UniqueName: "fake-plugin/volume-name") from node "node1" Volume is already used by pods ns2/pod2, ns1/pod3 on node node2, node3
            ```
    
      * When the node where is the volume attached is not known:
            ```
            Multi-Attach error for volume "volume-name" (UniqueName: "fake-plugin/volume-name") from node "node1" Volume is already exclusively attached to node node2 and can't be attached to another
            ```
    
    /kind bug
    /sig storage
    /assign @gnufied
    7de1a8e0
Name
Last commit
Last update
..
BUILD Loading commit data...
actual_state_of_world.go Loading commit data...
actual_state_of_world_test.go Loading commit data...
desired_state_of_world.go Loading commit data...
desired_state_of_world_test.go Loading commit data...