Skip to content

Commit

Permalink
Addresses cross compile for syscall.Unmount by delegating to Mount.
Browse files Browse the repository at this point in the history
  • Loading branch information
calfonso committed Mar 19, 2015
1 parent c0ff504 commit 9d0c9e7
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 @@ -26,6 +26,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 @@ -41,6 +42,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
}
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 9d0c9e7

Please sign in to comment.