Skip to content

Commit

Permalink
Merge pull request #84375 from cduchesne/automated-cherry-pick-of-#84…
Browse files Browse the repository at this point in the history
…321-upstream-release-1.15

Automated cherry pick of #84321: modify detach timeout to be csiTimeout
  • Loading branch information
k8s-ci-robot committed Oct 28, 2019
2 parents 43b1093 + 2106413 commit c3d9a5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/volume/csi/csi_attacher.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,12 @@ func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error {
}

klog.V(4).Info(log("detacher deleted ok VolumeAttachment.ID=%s", attachID))
return c.waitForVolumeDetachment(volID, attachID)
return c.waitForVolumeDetachment(volID, attachID, csiTimeout)
}

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))

timeout := c.waitSleepTime * 10
timer := time.NewTimer(timeout) // TODO (vladimirvivien) investigate making this configurable
defer timer.Stop()

Expand Down

0 comments on commit c3d9a5d

Please sign in to comment.