• Kubernetes Submit Queue's avatar
    Merge pull request #61147 from mlmhl/csi · 89d8884f
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 61147, 62236, 62018). 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>.
    
    Return NodeStageVolume/NodePublishVolume error if operation failed for CSI
    
    **What this PR does / why we need it**:
    
    Currently in CSI volume plugin, if `NodeStageVolume`/`NodePublishVolume` operation failed, we will try to remove according target dir(global mount path or pod volume path) first. If this clear operation failed, according error will be returned, and finally displayed in `Pod`'s event. However, compared to this clear error, the user is more concerned about `NodeStageVolume`/`NodePublishVolume` error, so I suggest that just log the clear error and still return the `NodeStageVolume`/`NodePublishVolume` error.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    
    /sig storage
    89d8884f
csi_attacher.go 19.7 KB