mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #57779 from jolestar/flex-volume-fix
Automatic merge from submit-queue (batch tested with PRs 57366, 57779). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove unused command waitfordetach from flex volume driver **What this PR does / why we need it**: Clean unused code. **Special notes for your reviewer**: See #35629 Original PR is https://github.com/kubernetes/kubernetes/pull/50754 , the PR's repo has bean deleted,so I create a new PR and merge upstream for test. **Release note**: ```release-note NONE ```
This commit is contained in:
commit
b729472952
@ -19,7 +19,6 @@ package flexvolume
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
@ -47,18 +46,6 @@ func (d *flexVolumeDetacher) Detach(volumeName string, hostName types.NodeName)
|
||||
return err
|
||||
}
|
||||
|
||||
// WaitForDetach is part of the volume.Detacher interface.
|
||||
func (d *flexVolumeDetacher) WaitForDetach(devicePath string, timeout time.Duration) error {
|
||||
call := d.plugin.NewDriverCallWithTimeout(waitForDetachCmd, timeout)
|
||||
call.Append(devicePath)
|
||||
|
||||
_, err := call.Run()
|
||||
if isCmdNotSupportedErr(err) {
|
||||
return (*detacherDefaults)(d).WaitForDetach(devicePath, timeout)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
// UnmountDevice is part of the volume.Detacher interface.
|
||||
func (d *flexVolumeDetacher) UnmountDevice(deviceMountPath string) error {
|
||||
|
||||
|
@ -39,7 +39,6 @@ const (
|
||||
mountDeviceCmd = "mountdevice"
|
||||
|
||||
detachCmd = "detach"
|
||||
waitForDetachCmd = "waitfordetach"
|
||||
unmountDeviceCmd = "unmountdevice"
|
||||
|
||||
mountCmd = "mount"
|
||||
|
Loading…
Reference in New Issue
Block a user