mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #5664 from calfonso/nfs_mount_plugin
Addresses cross compile for syscall.Unmount by delegating to Mount.
This commit is contained in:
commit
1cbde2c5c7
@ -29,6 +29,7 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/gce_pd"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/git_repo"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/host_path"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/nfs"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/secret"
|
||||
)
|
||||
|
||||
@ -44,6 +45,7 @@ func ProbeVolumePlugins() []volume.Plugin {
|
||||
allPlugins = append(allPlugins, git_repo.ProbeVolumePlugins()...)
|
||||
allPlugins = append(allPlugins, host_path.ProbeVolumePlugins()...)
|
||||
allPlugins = append(allPlugins, secret.ProbeVolumePlugins()...)
|
||||
allPlugins = append(allPlugins, nfs.ProbeVolumePlugins()...)
|
||||
|
||||
return allPlugins
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ package nfs
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"syscall"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount"
|
||||
"github.com/golang/glog"
|
||||
@ -59,7 +58,8 @@ func (mounter *nfsMounter) Mount(server string, exportDir string, mountDir strin
|
||||
}
|
||||
|
||||
func (mounter *nfsMounter) Unmount(target string) error {
|
||||
return syscall.Unmount(target, 0)
|
||||
unmounter := mount.New()
|
||||
return unmounter.Unmount(target, 0)
|
||||
}
|
||||
|
||||
func (mounter *nfsMounter) List() ([]mount.MountPoint, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user