Update for new mount API

This commit is contained in:
Justin Santa Barbara 2016-11-18 11:35:50 -05:00
parent 042b33395b
commit a34adc9be3
2 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ func (k *VolumeMountController) safeFormatAndMount(device string, mountpoint str
// If we are containerized, we still first SafeFormatAndMount in our namespace
// This is because SafeFormatAndMount doesn't seem to work in a container
safeFormatAndMount := &mount.SafeFormatAndMount{Interface: mount.New(), Runner: exec.New()}
safeFormatAndMount := &mount.SafeFormatAndMount{Interface: mount.New(""), Runner: exec.New()}
// Check if it is already mounted
mounts, err := safeFormatAndMount.List()

View File

@ -58,7 +58,7 @@ func NewMountDiskTask(name string, contents string, meta string) (fi.Task, error
}
func (e *MountDiskTask) Find(c *fi.Context) (*MountDiskTask, error) {
mounter := mount.New()
mounter := mount.New("")
mps, err := mounter.List()
if err != nil {
@ -121,7 +121,7 @@ func (_ *MountDiskTask) RenderLocal(t *local.LocalTarget, a, e, changes *MountDi
if changes.Mountpoint != "" {
glog.Infof("Mounting device %q on %q", e.Device, e.Mountpoint)
mounter := &mount.SafeFormatAndMount{Interface: mount.New(), Runner: exec.New()}
mounter := &mount.SafeFormatAndMount{Interface: mount.New(""), Runner: exec.New()}
fstype := ""
options := []string{}