Merge pull request #39055 from anguslees/detach

Automatic merge from submit-queue (batch tested with PRs 39152, 39142, 39055)

openstack: Forcibly detach an attached cinder volume before attaching elsewhere

Fixes #33288



**What this PR does / why we need it**:
Without this fix, we can't preemptively reschedule pods with persistent volumes to other hosts (for rebalancing or hardware failure recovery).

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #33288

**Special notes for your reviewer**:
(This is a resurrection/cleanup of PR #33734, originally authored by @Rotwang)

**Release note**:
This commit is contained in:
Kubernetes Submit Queue
2016-12-27 17:10:14 -08:00
committed by GitHub
2 changed files with 9 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ func (attacher *cinderDiskAttacher) WaitForAttach(spec *volume.Spec, devicePath
return devicePath, nil
} else {
// Log an error, and continue checking periodically
glog.Errorf("Error: could not find attached Cinder disk %q: %v", volumeID, err)
glog.Errorf("Error: could not find attached Cinder disk %q (path: %q): %v", volumeID, devicePath, err)
}
case <-timer.C:
return "", fmt.Errorf("Could not find attached Cinder disk %q. Timeout waiting for mount paths to be created.", volumeID)