Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for IsLikelyNotMountPoint (0.16 sec)

  1. 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)
  2. 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)
  3. 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)
  4. pkg/kubelet/kubelet_getters.go

    	mountedVolumes := []string{}
    	volumePaths, err := kl.getPodVolumePathListFromDisk(podUID)
    	if err != nil {
    		return mountedVolumes, err
    	}
    	// Only use IsLikelyNotMountPoint to check might not cover all cases. For CSI volumes that
    	// either: 1) don't mount or 2) bind mount in the rootfs, the mount check will not work as expected.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  5. pkg/volume/portworx/portworx.go

    }
    
    // SetUpAt attaches the disk and bind mounts to the volume path.
    func (b *portworxVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterArgs) error {
    	notMnt, err := b.mounter.IsLikelyNotMountPoint(dir)
    	klog.Infof("Portworx Volume set up. Dir: %s %v %v", dir, !notMnt, err)
    	if err != nil && !os.IsNotExist(err) {
    		klog.Errorf("Cannot validate mountpoint: %s", dir)
    		return err
    	}
    	if !notMnt {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  6. pkg/volume/emptydir/empty_dir.go

    	return ed.SetUpAt(ed.GetPath(), mounterArgs)
    }
    
    // SetUpAt creates new directory.
    func (ed *emptyDir) SetUpAt(dir string, mounterArgs volume.MounterArgs) error {
    	notMnt, err := ed.mounter.IsLikelyNotMountPoint(dir)
    	// Getting an os.IsNotExist err from is a contingency; the directory
    	// may not exist yet, in which case, setup should run.
    	if err != nil && !os.IsNotExist(err) {
    		return err
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. pkg/volume/local/local.go

    func (dm *deviceMounter) mountLocalBlockDevice(spec *volume.Spec, devicePath string, deviceMountPath string) error {
    	klog.V(4).Infof("local: mounting device %s to %s", devicePath, deviceMountPath)
    	notMnt, err := dm.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: Tue May 14 06:17:25 UTC 2024
    - 22.2K bytes
    - Viewed (0)
Back to top