mirror of https://github.com/k3s-io/k3s
Merge pull request #25523 from saad-ali/modifyDetachToUseSpec
Modify Detach method to take disk namepull/6/head
commit
4aa332e8f2
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue