Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for WaitForAttach (0.18 sec)

  1. pkg/volume/flexvolume/attacher.go

    		return (*attacherDefaults)(a).Attach(spec, hostName)
    	} else if err != nil {
    		return "", err
    	}
    	return status.DevicePath, err
    }
    
    // WaitForAttach is part of the volume.Attacher interface
    func (a *flexVolumeAttacher) WaitForAttach(spec *volume.Spec, devicePath string, _ *v1.Pod, timeout time.Duration) (string, error) {
    	call := a.plugin.NewDriverCallWithTimeout(waitForAttachCmd, timeout)
    	call.Append(devicePath)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 03 23:29:42 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  2. pkg/volume/flexvolume/attacher-defaults.go

    	return "", nil
    }
    
    // WaitForAttach is part of the volume.Attacher interface
    func (a *attacherDefaults) WaitForAttach(spec *volume.Spec, devicePath string, timeout time.Duration) (string, error) {
    	klog.Warning(logPrefix(a.plugin.flexVolumePlugin), "using default WaitForAttach for volume ", spec.Name(), ", device ", devicePath)
    	return devicePath, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 17 04:51:24 UTC 2020
    - 2.4K bytes
    - Viewed (0)
  3. pkg/volume/volume.go

    	VolumesAreAttached(specs []*Spec, nodeName types.NodeName) (map[*Spec]bool, error)
    
    	// WaitForAttach blocks until the device is attached to this
    	// node. If it successfully attaches, the path to the device
    	// is returned. Otherwise, if the device does not attach after
    	// the given timeout period, an error will be returned.
    	WaitForAttach(spec *Spec, devicePath string, pod *v1.Pod, timeout time.Duration) (string, error)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  4. pkg/volume/csi/csi_test.go

    				devicePath, err = volAttacher.WaitForAttach(volSpec, "", pod, 500*time.Millisecond)
    				if err != nil {
    					t.Fatal("csiTest.VolumeAll attacher.WaitForAttach failed:", err)
    				}
    
    				if devicePath != attachName {
    					t.Fatalf("csiTest.VolumeAll attacher.WaitForAttach got unexpected value %s", devicePath)
    				}
    
    				t.Log("csiTest.VolumeAll attacher.WaitForAttach succeeded OK, attachment ID:", devicePath)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 15:55:13 UTC 2022
    - 21.1K bytes
    - Viewed (0)
  5. pkg/volume/flexvolume/attacher_test.go

    	plugin, _ := testPlugin(t)
    	plugin.runner = fakeRunner(
    		assertDriverCall(t, notSupportedOutput(), waitForAttachCmd, "/dev/sdx",
    			specJSON(plugin, spec, nil)),
    	)
    
    	a, _ := plugin.NewAttacher()
    	a.WaitForAttach(spec, "/dev/sdx", pod, 1*time.Second)
    }
    
    func TestMountDevice(tt *testing.T) {
    	t := harness.For(tt)
    	defer t.Close()
    
    	spec := fakeVolumeSpec()
    
    	plugin, rootDir := testPlugin(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 03 23:29:42 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  6. pkg/volume/iscsi/attacher.go

    	volumesAttachedCheck := make(map[*volume.Spec]bool)
    	for _, spec := range specs {
    		volumesAttachedCheck[spec] = true
    	}
    
    	return volumesAttachedCheck, nil
    }
    
    func (attacher *iscsiAttacher) WaitForAttach(spec *volume.Spec, devicePath string, pod *v1.Pod, timeout time.Duration) (string, error) {
    	mounter, err := volumeSpecToMounter(spec, attacher.host, attacher.targetLocks, pod)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 04 08:51:31 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  7. pkg/volume/util/operationexecutor/operation_generator.go

    		if volumeAttacher != nil {
    			// Wait for attachable volumes to finish attaching
    			klog.InfoS(volumeToMount.GenerateMsgDetailed("MountVolume.WaitForAttach entering", fmt.Sprintf("DevicePath %q", volumeToMount.DevicePath)), "pod", klog.KObj(volumeToMount.Pod))
    
    			devicePath, err = volumeAttacher.WaitForAttach(
    				volumeToMount.VolumeSpec, devicePath, volumeToMount.Pod, waitForAttachTimeout)
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 101.4K bytes
    - Viewed (0)
  8. pkg/controller/volume/attachdetach/testing/testvolumespec.go

    	return nil, nil
    }
    
    func (attacher *testPluginAttacher) WaitForAttach(spec *volume.Spec, devicePath string, pod *v1.Pod, timeout time.Duration) (string, error) {
    	attacher.pluginLock.Lock()
    	defer attacher.pluginLock.Unlock()
    	if spec == nil {
    		*attacher.ErrorEncountered = true
    		return "", fmt.Errorf("WaitForAttach called with nil volume spec")
    	}
    	fakePath := fmt.Sprintf("%s/%s", devicePath, spec.Name())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 17 08:48:30 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  9. pkg/volume/csi/csi_attacher_test.go

    			}
    			wg.Wait()
    		})
    	}
    }
    
    func TestAttacherWaitForVolumeAttachmentWithCSIDriver(t *testing.T) {
    	// In order to detect if the volume plugin would skip WaitForAttach for non-attachable drivers,
    	// we do not instantiate any VolumeAttachment. So if the plugin does not skip attach,  WaitForVolumeAttachment
    	// will return an error that volume attachment was not found.
    	tests := []struct {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 12:23:16 UTC 2024
    - 58.1K bytes
    - Viewed (0)
  10. pkg/volume/flexvolume/driver-call.go

    )
    
    const (
    	// Driver calls
    	initCmd          = "init"
    	getVolumeNameCmd = "getvolumename"
    
    	isAttached = "isattached"
    
    	attachCmd        = "attach"
    	waitForAttachCmd = "waitforattach"
    	mountDeviceCmd   = "mountdevice"
    
    	detachCmd        = "detach"
    	unmountDeviceCmd = "unmountdevice"
    
    	mountCmd   = "mount"
    	unmountCmd = "unmount"
    
    	expandVolumeCmd = "expandvolume"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 25 02:39:55 UTC 2021
    - 7.5K bytes
    - Viewed (0)
Back to top