Fix variable shadowing in exponential backoff when deleting volumes

Also fix pv_controller unit tests to behave more accurately
in light of exponential backoffs
This commit is contained in:
Hemant Kumar
2016-12-15 23:03:58 -05:00
parent 15059e6a5b
commit 7b423085fa
4 changed files with 72 additions and 4 deletions

View File

@@ -1079,7 +1079,7 @@ func (ctrl *PersistentVolumeController) deleteVolumeOperation(arg interface{}) e
} else {
// The plugin failed, mark the volume as Failed and send Warning
// event
if _, err = ctrl.updateVolumePhaseWithEvent(volume, v1.VolumeFailed, v1.EventTypeWarning, "VolumeFailedDelete", err.Error()); err != nil {
if _, err := ctrl.updateVolumePhaseWithEvent(volume, v1.VolumeFailed, v1.EventTypeWarning, "VolumeFailedDelete", err.Error()); err != nil {
glog.V(4).Infof("deleteVolumeOperation [%s]: failed to mark volume as failed: %v", volume.Name, err)
// Save failed, retry on the next deletion attempt
return err