本文整理匯總了Golang中k8s/io/kubernetes/pkg/volume/util.UnmountPath函數的典型用法代碼示例。如果您正苦於以下問題:Golang UnmountPath函數的具體用法?Golang UnmountPath怎麽用?Golang UnmountPath使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了UnmountPath函數的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: UnmountDevice
// 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
}
}
示例2: SetUpAt
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
}
示例3: UnmountDevice
func (detacher *gcePersistentDiskDetacher) UnmountDevice(deviceMountPath string) error {
return volumeutil.UnmountPath(deviceMountPath, detacher.host.GetMounter())
}
示例4: TearDownAt
// 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)
}
示例5: UnmountDevice
func (detacher *cinderDiskDetacher) UnmountDevice(deviceMountPath string) error {
return volumeutil.UnmountPath(deviceMountPath, detacher.mounter)
}
示例6: TearDownAt
func (c *nfsUnmounter) TearDownAt(dir string) error {
return util.UnmountPath(dir, c.mounter)
}
示例7: UnmountDevice
func (detacher *vsphereVMDKDetacher) UnmountDevice(deviceMountPath string) error {
return volumeutil.UnmountPath(deviceMountPath, detacher.mounter)
}
示例8: TearDownAt
// TearDownAt unmounts the bind mount
func (c *flockerVolumeUnmounter) TearDownAt(dir string) error {
return util.UnmountPath(dir, c.mounter)
}
示例9: TearDownAt
// Unmounts the bind mount
func (c *awsElasticBlockStoreUnmounter) TearDownAt(dir string) error {
return util.UnmountPath(dir, c.mounter)
}
示例10: TearDownAt
func (c *glusterfsUnmounter) TearDownAt(dir string) error {
return volutil.UnmountPath(dir, c.mounter)
}
示例11: TearDownAt
// 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)
}