Merge pull request #25523 from saad-ali/modifyDetachToUseSpec

Modify Detach method to take disk name
pull/6/head
Saad Ali 2016-05-12 15:53:18 -07:00
commit 4aa332e8f2
2 changed files with 4 additions and 4 deletions

View File

@ -2012,7 +2012,8 @@ func (kl *Kubelet) cleanupOrphanedVolumes(pods []*api.Pod, runningPods []*kubeco
glog.Errorf("Could not unmount the global mount for %q: %v", name, err)
}
err = detacher.Detach(refs[0], kl.hostname)
pdName := path.Base(refs[0])
err = detacher.Detach(pdName, kl.hostname)
if err != nil {
glog.Errorf("Could not detach volume %q at %q: %v", name, volumePath, err)
}

View File

@ -152,9 +152,8 @@ type Attacher interface {
// Detacher can detach a volume from a node.
type Detacher interface {
// Detach the given volume from the given host.
Detach(deviceMountPath string, hostName string) error
// Detach the given device from the given host.
Detach(deviceName, hostName string) error
// WaitForDetach blocks until the device is detached from this
// node. If the device does not detach within the given timeout