mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Modify Detach method to take disk name
This commit is contained in:
parent
b1560f36c3
commit
bce708c22f
@ -2006,7 +2006,8 @@ func (kl *Kubelet) cleanupOrphanedVolumes(pods []*api.Pod, runningPods []*kubeco
|
|||||||
glog.Errorf("Could not unmount the global mount for %q: %v", name, err)
|
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 {
|
if err != nil {
|
||||||
glog.Errorf("Could not detach volume %q at %q: %v", name, volumePath, err)
|
glog.Errorf("Could not detach volume %q at %q: %v", name, volumePath, err)
|
||||||
}
|
}
|
||||||
|
@ -152,9 +152,8 @@ type Attacher interface {
|
|||||||
|
|
||||||
// Detacher can detach a volume from a node.
|
// Detacher can detach a volume from a node.
|
||||||
type Detacher interface {
|
type Detacher interface {
|
||||||
|
// Detach the given device from the given host.
|
||||||
// Detach the given volume from the given host.
|
Detach(deviceName, hostName string) error
|
||||||
Detach(deviceMountPath string, hostName string) error
|
|
||||||
|
|
||||||
// WaitForDetach blocks until the device is detached from this
|
// WaitForDetach blocks until the device is detached from this
|
||||||
// node. If the device does not detach within the given timeout
|
// node. If the device does not detach within the given timeout
|
||||||
|
Loading…
Reference in New Issue
Block a user