Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for IsLikelyNotMountPoint (0.24 sec)

  1. pkg/volume/fc/disk_manager.go

    		noMnt, mntErr := b.mounter.IsLikelyNotMountPoint(volPath)
    		if mntErr != nil {
    			klog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
    			return err
    		}
    		if !noMnt {
    			if mntErr = b.mounter.Unmount(volPath); mntErr != nil {
    				klog.Errorf("Failed to unmount: %v", mntErr)
    				return err
    			}
    			noMnt, mntErr = b.mounter.IsLikelyNotMountPoint(volPath)
    			if mntErr != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 03 19:34:37 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. pkg/volume/iscsi/disk_manager.go

    		noMnt, mntErr := b.mounter.IsLikelyNotMountPoint(volPath)
    		if mntErr != nil {
    			klog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
    			return err
    		}
    		if !noMnt {
    			if mntErr = b.mounter.Unmount(volPath); mntErr != nil {
    				klog.Errorf("Failed to unmount: %v", mntErr)
    				return err
    			}
    			noMnt, mntErr = b.mounter.IsLikelyNotMountPoint(volPath)
    			if mntErr != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 03 19:34:37 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  3. pkg/util/removeall/removeall_test.go

    	"testing"
    
    	utiltesting "k8s.io/client-go/util/testing"
    	"k8s.io/mount-utils"
    )
    
    type fakeMounter struct {
    	mount.FakeMounter
    }
    
    // IsLikelyNotMountPoint overrides mount.FakeMounter.IsLikelyNotMountPoint for our use.
    func (f *fakeMounter) IsLikelyNotMountPoint(file string) (bool, error) {
    	name := filepath.Base(file)
    	if strings.HasPrefix(name, "mount") {
    		return false, nil
    	}
    	if strings.HasPrefix(name, "err") {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 20:35:13 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  4. pkg/volume/emptydir/empty_dir_linux.go

    	klog.V(5).Infof("Determining mount medium of %v", path)
    	notMnt, err := m.mounter.IsLikelyNotMountPoint(path)
    	if err != nil {
    		return v1.StorageMediumDefault, false, nil, fmt.Errorf("IsLikelyNotMountPoint(%q): %v", path, err)
    	}
    
    	buf := unix.Statfs_t{}
    	if err := unix.Statfs(path, &buf); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  5. pkg/util/removeall/removeall.go

    // returns nil (no error).
    // It makes sure it does not cross mount boundary, i.e. it does *not* remove
    // files from another filesystems. Like 'rm -rf --one-file-system'.
    // It is copied from RemoveAll() sources, with IsLikelyNotMountPoint
    func RemoveAllOneFilesystemCommon(mounter mount.Interface, path string, remove func(string) error) error {
    	// Simple case: if Remove works, we're done.
    	err := remove(path)
    	if err == nil || os.IsNotExist(err) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 15 16:41:02 UTC 2021
    - 3.8K bytes
    - Viewed (0)
  6. pkg/volume/flexvolume/util.go

    	}
    	return nil, errNotFlexVolume
    }
    
    func prepareForMount(mounter mount.Interface, deviceMountPath string) (bool, error) {
    
    	notMnt, err := mounter.IsLikelyNotMountPoint(deviceMountPath)
    	if err != nil {
    		if os.IsNotExist(err) {
    			if err := os.MkdirAll(deviceMountPath, 0750); err != nil {
    				return false, err
    			}
    			notMnt = true
    		} else {
    			return false, err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 14 13:58:56 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  7. pkg/volume/csi/csi_mounter.go

    	}
    	return false
    }
    
    // isDirMounted returns the !notMounted result from IsLikelyNotMountPoint check
    func isDirMounted(plug *csiPlugin, dir string) (bool, error) {
    	mounter := plug.host.GetMounter(plug.GetPluginName())
    	notMnt, err := mounter.IsLikelyNotMountPoint(dir)
    	if err != nil && !os.IsNotExist(err) {
    		klog.Error(log("isDirMounted IsLikelyNotMountPoint test failed for dir [%v]", dir))
    		return false, err
    	}
    	return !notMnt, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jan 30 10:47:59 UTC 2024
    - 21K bytes
    - Viewed (0)
  8. pkg/volume/iscsi/attacher.go

    func (attacher *iscsiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string, mountArgs volume.DeviceMounterArgs) error {
    	mounter := attacher.host.GetMounter(iscsiPluginName)
    	notMnt, err := mounter.IsLikelyNotMountPoint(deviceMountPath)
    	if err != nil {
    		if os.IsNotExist(err) {
    			if err := os.MkdirAll(deviceMountPath, 0750); err != nil {
    				return err
    			}
    			notMnt = true
    		} else {
    			return err
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 04 08:51:31 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  9. pkg/volume/fc/attacher.go

    }
    
    func (attacher *fcAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMountPath string, mountArgs volume.DeviceMounterArgs) error {
    	mounter := attacher.host.GetMounter(fcPluginName)
    	notMnt, err := mounter.IsLikelyNotMountPoint(deviceMountPath)
    	if err != nil {
    		if os.IsNotExist(err) {
    			if err := os.MkdirAll(deviceMountPath, 0750); err != nil {
    				return err
    			}
    			notMnt = true
    		} else {
    			return err
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 31 12:02:51 UTC 2022
    - 7.5K bytes
    - Viewed (0)
  10. pkg/volume/nfs/nfs.go

    	return c.TearDownAt(c.GetPath())
    }
    
    func (c *nfsUnmounter) TearDownAt(dir string) error {
    	// Use extensiveMountPointCheck to consult /proc/mounts. We can't use faster
    	// IsLikelyNotMountPoint (lstat()), since there may be root_squash on the
    	// NFS server and kubelet may not be able to do lstat/stat() there.
    	forceUnmounter, ok := c.mounter.(mount.MounterForceUnmounter)
    	if ok {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top