mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #84321 from cduchesne/csi-detach-timeout
CSI: modify detach timeout to match attach timeout
This commit is contained in:
commit
cb0f80efe7
@ -386,14 +386,13 @@ func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Info(log("detacher deleted ok VolumeAttachment.ID=%s", attachID))
|
klog.V(4).Info(log("detacher deleted ok VolumeAttachment.ID=%s", attachID))
|
||||||
err := c.waitForVolumeDetachment(volID, attachID)
|
err := c.waitForVolumeDetachment(volID, attachID, csiTimeout)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *csiAttacher) waitForVolumeDetachment(volumeHandle, attachID string) error {
|
func (c *csiAttacher) waitForVolumeDetachment(volumeHandle, attachID string, timeout time.Duration) error {
|
||||||
klog.V(4).Info(log("probing for updates from CSI driver for [attachment.ID=%v]", attachID))
|
klog.V(4).Info(log("probing for updates from CSI driver for [attachment.ID=%v]", attachID))
|
||||||
|
|
||||||
timeout := c.waitSleepTime * 10
|
|
||||||
timer := time.NewTimer(timeout) // TODO (vladimirvivien) investigate making this configurable
|
timer := time.NewTimer(timeout) // TODO (vladimirvivien) investigate making this configurable
|
||||||
defer timer.Stop()
|
defer timer.Stop()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user