Skip to content

Commit

Permalink
Merge pull request kubernetes#5664 from calfonso/nfs_mount_plugin
Browse files Browse the repository at this point in the history
Addresses cross compile for syscall.Unmount by delegating to Mount.
  • Loading branch information
thockin committed Mar 19, 2015
2 parents 98925b4 + 9d0c9e7 commit 1cbde2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmd/kubelet/app/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/kubelet/volume/nfs/nfs_mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package nfs

import (
"os/exec"
"syscall"

"github.com/GoogleCloudPlatform/kubernetes/pkg/util/mount"
"github.com/golang/glog"
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 1cbde2c

Please sign in to comment.