// UnmountDevice unmounts the volume on the node func (detacher *azureDiskDetacher) UnmountDevice(deviceMountPath string) error { volume := path.Base(deviceMountPath) if err := util.UnmountPath(deviceMountPath, detacher.mounter); err != nil { glog.Errorf("Error unmounting %q: %v", volume, err) return err } else { return nil } }
func (b *glusterfsMounter) SetUpAt(dir string, fsGroup *int64) error { notMnt, err := b.mounter.IsLikelyNotMountPoint(dir) glog.V(4).Infof("glusterfs: mount set up: %s %v %v", dir, !notMnt, err) if err != nil && !os.IsNotExist(err) { return err } if !notMnt { return nil } os.MkdirAll(dir, 0750) err = b.setUpAtInternal(dir) if err == nil { return nil } // Cleanup upon failure. volutil.UnmountPath(dir, b.mounter) return err }
// SetUpAt attaches the disk and bind mounts to the volume path. func (cephfsVolume *cephfsMounter) SetUpAt(dir string, fsGroup *int64) error { notMnt, err := cephfsVolume.mounter.IsLikelyNotMountPoint(dir) glog.V(4).Infof("CephFS mount set up: %s %v %v", dir, !notMnt, err) if err != nil && !os.IsNotExist(err) { return err } if !notMnt { return nil } os.MkdirAll(dir, 0750) err = cephfsVolume.execMount(dir) if err == nil { return nil } // cleanup upon failure util.UnmountPath(dir, cephfsVolume.mounter) // return error return err }
func (detacher *gcePersistentDiskDetacher) UnmountDevice(deviceMountPath string) error { return volumeutil.UnmountPath(deviceMountPath, detacher.host.GetMounter()) }
// Unmounts the bind mount, and detaches the disk only if the PD // resource was the last reference to that disk on the kubelet. func (c *photonPersistentDiskUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, c.mounter) }
func (detacher *cinderDiskDetacher) UnmountDevice(deviceMountPath string) error { return volumeutil.UnmountPath(deviceMountPath, detacher.mounter) }
func (detacher *awsElasticBlockStoreDetacher) UnmountDevice(deviceMountPath string) error { return volumeutil.UnmountPath(deviceMountPath, detacher.mounter) }
func (c *nfsUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, c.mounter) }
func (detacher *vsphereVMDKDetacher) UnmountDevice(deviceMountPath string) error { return volumeutil.UnmountPath(deviceMountPath, detacher.mounter) }
// TearDownAt unmounts the bind mount func (cephfsVolume *cephfsUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, cephfsVolume.mounter) }
// TearDownAt unmounts the bind mount func (c *flockerVolumeUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, c.mounter) }
// Unmounts the bind mount func (c *awsElasticBlockStoreUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, c.mounter) }
func (c *glusterfsUnmounter) TearDownAt(dir string) error { return volutil.UnmountPath(dir, c.mounter) }
func (detacher *photonPersistentDiskDetacher) UnmountDevice(deviceMountPath string) error { return volumeutil.UnmountPath(deviceMountPath, detacher.mounter) }
// Unmounts the bind mount, and detaches the disk only if the PD // resource was the last reference to that disk on the kubelet. func (v *vsphereVolumeUnmounter) TearDownAt(dir string) error { return util.UnmountPath(dir, v.mounter) }