mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
cleanup: remove package csi duplicated error log
return err directly in func; delete new line in error message cleanup: use errors.New(log()) to uniform error message
This commit is contained in:
parent
3758426884
commit
d26e352fe7
@ -66,8 +66,7 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string
|
|||||||
|
|
||||||
pvSrc, err := getPVSourceFromSpec(spec)
|
pvSrc, err := getPVSourceFromSpec(spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("attacher.Attach failed to get CSIPersistentVolumeSource: %v", err))
|
return "", errors.New(log("attacher.Attach failed to get CSIPersistentVolumeSource: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
node := string(nodeName)
|
node := string(nodeName)
|
||||||
@ -107,8 +106,7 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string
|
|||||||
alreadyExist := false
|
alreadyExist := false
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !apierrs.IsAlreadyExists(err) {
|
if !apierrs.IsAlreadyExists(err) {
|
||||||
klog.Error(log("attacher.Attach failed: %v", err))
|
return "", errors.New(log("attacher.Attach failed: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
alreadyExist = true
|
alreadyExist = true
|
||||||
}
|
}
|
||||||
@ -132,8 +130,7 @@ func (c *csiAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string
|
|||||||
func (c *csiAttacher) WaitForAttach(spec *volume.Spec, _ string, pod *v1.Pod, timeout time.Duration) (string, error) {
|
func (c *csiAttacher) WaitForAttach(spec *volume.Spec, _ string, pod *v1.Pod, timeout time.Duration) (string, error) {
|
||||||
source, err := getPVSourceFromSpec(spec)
|
source, err := getPVSourceFromSpec(spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("attacher.WaitForAttach failed to extract CSI volume source: %v", err))
|
return "", errors.New(log("attacher.WaitForAttach failed to extract CSI volume source: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
attachID := getAttachmentName(source.VolumeHandle, source.Driver, string(c.plugin.host.GetNodeName()))
|
attachID := getAttachmentName(source.VolumeHandle, source.Driver, string(c.plugin.host.GetNodeName()))
|
||||||
@ -283,8 +280,7 @@ func (c *csiAttacher) GetDeviceMountPath(spec *volume.Spec) (string, error) {
|
|||||||
klog.V(4).Info(log("attacher.GetDeviceMountPath(%v)", spec))
|
klog.V(4).Info(log("attacher.GetDeviceMountPath(%v)", spec))
|
||||||
deviceMountPath, err := makeDeviceMountPath(c.plugin, spec)
|
deviceMountPath, err := makeDeviceMountPath(c.plugin, spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("attacher.GetDeviceMountPath failed to make device mount path: %v", err))
|
return "", errors.New(log("attacher.GetDeviceMountPath failed to make device mount path: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Infof("attacher.GetDeviceMountPath succeeded, deviceMountPath: %s", deviceMountPath)
|
klog.V(4).Infof("attacher.GetDeviceMountPath succeeded, deviceMountPath: %s", deviceMountPath)
|
||||||
return deviceMountPath, nil
|
return deviceMountPath, nil
|
||||||
@ -315,15 +311,13 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo
|
|||||||
}
|
}
|
||||||
csiSource, err := getPVSourceFromSpec(spec)
|
csiSource, err := getPVSourceFromSpec(spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("attacher.MountDevice failed to get CSIPersistentVolumeSource: %v", err))
|
return errors.New(log("attacher.MountDevice failed to get CSIPersistentVolumeSource: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Store volume metadata for UnmountDevice. Keep it around even if the
|
// Store volume metadata for UnmountDevice. Keep it around even if the
|
||||||
// driver does not support NodeStage, UnmountDevice still needs it.
|
// driver does not support NodeStage, UnmountDevice still needs it.
|
||||||
if err = os.MkdirAll(deviceMountPath, 0750); err != nil {
|
if err = os.MkdirAll(deviceMountPath, 0750); err != nil {
|
||||||
klog.Error(log("attacher.MountDevice failed to create dir %#v: %v", deviceMountPath, err))
|
return errors.New(log("attacher.MountDevice failed to create dir %#v: %v", deviceMountPath, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("created target path successfully [%s]", deviceMountPath))
|
klog.V(4).Info(log("created target path successfully [%s]", deviceMountPath))
|
||||||
dataDir := filepath.Dir(deviceMountPath)
|
dataDir := filepath.Dir(deviceMountPath)
|
||||||
@ -351,8 +345,7 @@ func (c *csiAttacher) MountDevice(spec *volume.Spec, devicePath string, deviceMo
|
|||||||
if c.csiClient == nil {
|
if c.csiClient == nil {
|
||||||
c.csiClient, err = newCsiDriverClient(csiDriverName(csiSource.Driver))
|
c.csiClient, err = newCsiDriverClient(csiDriverName(csiSource.Driver))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(log("attacher.MountDevice failed to create newCsiDriverClient: %v", err))
|
return errors.New(log("attacher.MountDevice failed to create newCsiDriverClient: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
csi := c.csiClient
|
csi := c.csiClient
|
||||||
@ -457,8 +450,7 @@ func (c *csiAttacher) Detach(volumeName string, nodeName types.NodeName) error {
|
|||||||
klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volID))
|
klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volID))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
klog.Error(log("detacher.Detach failed to delete VolumeAttachment [%s]: %v", attachID, err))
|
return errors.New(log("detacher.Detach failed to delete VolumeAttachment [%s]: %v", attachID, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Info(log("detacher deleted ok VolumeAttachment.ID=%s", attachID))
|
klog.V(4).Info(log("detacher deleted ok VolumeAttachment.ID=%s", attachID))
|
||||||
@ -484,8 +476,7 @@ func (c *csiAttacher) waitForVolumeDetachmentInternal(volumeHandle, attachID str
|
|||||||
klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volumeHandle))
|
klog.V(4).Info(log("VolumeAttachment object [%v] for volume [%v] not found, object deleted", attachID, volumeHandle))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
klog.Error(log("detacher.WaitForDetach failed for volume [%s] (will continue to try): %v", volumeHandle, err))
|
return errors.New(log("detacher.WaitForDetach failed for volume [%s] (will continue to try): %v", volumeHandle, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
// driver reports attach error
|
// driver reports attach error
|
||||||
detachErr := attach.Status.DetachError
|
detachErr := attach.Status.DetachError
|
||||||
@ -566,8 +557,7 @@ func (c *csiAttacher) UnmountDevice(deviceMountPath string) error {
|
|||||||
if c.csiClient == nil {
|
if c.csiClient == nil {
|
||||||
c.csiClient, err = newCsiDriverClient(csiDriverName(driverName))
|
c.csiClient, err = newCsiDriverClient(csiDriverName(driverName))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(log("attacher.UnmountDevice failed to create newCsiDriverClient: %v", err))
|
return errors.New(log("attacher.UnmountDevice failed to create newCsiDriverClient: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
csi := c.csiClient
|
csi := c.csiClient
|
||||||
@ -577,8 +567,7 @@ func (c *csiAttacher) UnmountDevice(deviceMountPath string) error {
|
|||||||
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
||||||
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(log("attacher.UnmountDevice failed to check whether STAGE_UNSTAGE_VOLUME set: %v", err))
|
return errors.New(log("attacher.UnmountDevice failed to check whether STAGE_UNSTAGE_VOLUME set: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
if !stageUnstageSet {
|
if !stageUnstageSet {
|
||||||
klog.Infof(log("attacher.UnmountDevice STAGE_UNSTAGE_VOLUME capability not set. Skipping UnmountDevice..."))
|
klog.Infof(log("attacher.UnmountDevice STAGE_UNSTAGE_VOLUME capability not set. Skipping UnmountDevice..."))
|
||||||
@ -596,8 +585,7 @@ func (c *csiAttacher) UnmountDevice(deviceMountPath string) error {
|
|||||||
deviceMountPath)
|
deviceMountPath)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(log("attacher.UnmountDevice failed: %v", err))
|
return errors.New(log("attacher.UnmountDevice failed: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete the global directory + json file
|
// Delete the global directory + json file
|
||||||
|
@ -97,8 +97,7 @@ func (m *csiBlockMapper) stageVolumeForBlock(
|
|||||||
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
||||||
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.stageVolumeForBlock failed to check STAGE_UNSTAGE_VOLUME capability: %v", err))
|
return "", errors.New(log("blockMapper.stageVolumeForBlock failed to check STAGE_UNSTAGE_VOLUME capability: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
if !stageUnstageSet {
|
if !stageUnstageSet {
|
||||||
klog.Infof(log("blockMapper.stageVolumeForBlock STAGE_UNSTAGE_VOLUME capability not set. Skipping MountDevice..."))
|
klog.Infof(log("blockMapper.stageVolumeForBlock STAGE_UNSTAGE_VOLUME capability not set. Skipping MountDevice..."))
|
||||||
@ -119,8 +118,7 @@ func (m *csiBlockMapper) stageVolumeForBlock(
|
|||||||
|
|
||||||
// Creating a stagingPath directory before call to NodeStageVolume
|
// Creating a stagingPath directory before call to NodeStageVolume
|
||||||
if err := os.MkdirAll(stagingPath, 0750); err != nil {
|
if err := os.MkdirAll(stagingPath, 0750); err != nil {
|
||||||
klog.Error(log("blockMapper.stageVolumeForBlock failed to create dir %s: %v", stagingPath, err))
|
return "", errors.New(log("blockMapper.stageVolumeForBlock failed to create dir %s: %v", stagingPath, err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("blockMapper.stageVolumeForBlock created stagingPath directory successfully [%s]", stagingPath))
|
klog.V(4).Info(log("blockMapper.stageVolumeForBlock created stagingPath directory successfully [%s]", stagingPath))
|
||||||
|
|
||||||
@ -138,8 +136,7 @@ func (m *csiBlockMapper) stageVolumeForBlock(
|
|||||||
nil /* MountOptions */)
|
nil /* MountOptions */)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.stageVolumeForBlock failed: %v", err))
|
return "", errors.New(log("blockMapper.stageVolumeForBlock failed: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Infof(log("blockMapper.stageVolumeForBlock successfully requested NodeStageVolume [%s]", stagingPath))
|
klog.V(4).Infof(log("blockMapper.stageVolumeForBlock successfully requested NodeStageVolume [%s]", stagingPath))
|
||||||
@ -167,9 +164,8 @@ func (m *csiBlockMapper) publishVolumeForBlock(
|
|||||||
if csiSource.NodePublishSecretRef != nil {
|
if csiSource.NodePublishSecretRef != nil {
|
||||||
nodePublishSecrets, err = getCredentialsFromSecret(m.k8s, csiSource.NodePublishSecretRef)
|
nodePublishSecrets, err = getCredentialsFromSecret(m.k8s, csiSource.NodePublishSecretRef)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf("blockMapper.publishVolumeForBlock failed to get NodePublishSecretRef %s/%s: %v",
|
return "", errors.New(log("blockMapper.publishVolumeForBlock failed to get NodePublishSecretRef %s/%s: %v",
|
||||||
csiSource.NodePublishSecretRef.Namespace, csiSource.NodePublishSecretRef.Name, err)
|
csiSource.NodePublishSecretRef.Namespace, csiSource.NodePublishSecretRef.Name, err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,8 +173,7 @@ func (m *csiBlockMapper) publishVolumeForBlock(
|
|||||||
// Setup a parent directory for publishPath before call to NodePublishVolume
|
// Setup a parent directory for publishPath before call to NodePublishVolume
|
||||||
publishDir := filepath.Dir(publishPath)
|
publishDir := filepath.Dir(publishPath)
|
||||||
if err := os.MkdirAll(publishDir, 0750); err != nil {
|
if err := os.MkdirAll(publishDir, 0750); err != nil {
|
||||||
klog.Error(log("blockMapper.publishVolumeForBlock failed to create dir %s: %v", publishDir, err))
|
return "", errors.New(log("blockMapper.publishVolumeForBlock failed to create dir %s: %v", publishDir, err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("blockMapper.publishVolumeForBlock created directory for publishPath successfully [%s]", publishDir))
|
klog.V(4).Info(log("blockMapper.publishVolumeForBlock created directory for publishPath successfully [%s]", publishDir))
|
||||||
|
|
||||||
@ -202,8 +197,7 @@ func (m *csiBlockMapper) publishVolumeForBlock(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf(log("blockMapper.publishVolumeForBlock failed: %v", err))
|
return "", errors.New(log("blockMapper.publishVolumeForBlock failed: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return publishPath, nil
|
return publishPath, nil
|
||||||
@ -218,21 +212,18 @@ func (m *csiBlockMapper) SetUpDevice() (string, error) {
|
|||||||
|
|
||||||
// Get csiSource from spec
|
// Get csiSource from spec
|
||||||
if m.spec == nil {
|
if m.spec == nil {
|
||||||
klog.Error(log("blockMapper.SetUpDevice spec is nil"))
|
return "", errors.New(log("blockMapper.SetUpDevice spec is nil"))
|
||||||
return "", fmt.Errorf("spec is nil")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
csiSource, err := getCSISourceFromSpec(m.spec)
|
csiSource, err := getCSISourceFromSpec(m.spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.SetUpDevice failed to get CSI persistent source: %v", err))
|
return "", errors.New(log("blockMapper.SetUpDevice failed to get CSI persistent source: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
driverName := csiSource.Driver
|
driverName := csiSource.Driver
|
||||||
skip, err := m.plugin.skipAttach(driverName)
|
skip, err := m.plugin.skipAttach(driverName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.SetupDevice failed to check CSIDriver for %s: %v", driverName, err))
|
return "", errors.New(log("blockMapper.SetupDevice failed to check CSIDriver for %s: %v", driverName, err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var attachment *storage.VolumeAttachment
|
var attachment *storage.VolumeAttachment
|
||||||
@ -242,8 +233,7 @@ func (m *csiBlockMapper) SetUpDevice() (string, error) {
|
|||||||
attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName)
|
attachID := getAttachmentName(csiSource.VolumeHandle, csiSource.Driver, nodeName)
|
||||||
attachment, err = m.k8s.StorageV1().VolumeAttachments().Get(attachID, meta.GetOptions{})
|
attachment, err = m.k8s.StorageV1().VolumeAttachments().Get(attachID, meta.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err))
|
return "", errors.New(log("blockMapper.SetupDevice failed to get volume attachment [id=%v]: %v", attachID, err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,8 +248,7 @@ func (m *csiBlockMapper) SetUpDevice() (string, error) {
|
|||||||
|
|
||||||
csiClient, err := m.csiClientGetter.Get()
|
csiClient, err := m.csiClientGetter.Get()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.SetUpDevice failed to get CSI client: %v", err))
|
return "", errors.New(log("blockMapper.SetUpDevice failed to get CSI client: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call NodeStageVolume
|
// Call NodeStageVolume
|
||||||
@ -291,8 +280,7 @@ func (m *csiBlockMapper) unpublishVolumeForBlock(ctx context.Context, csi csiCli
|
|||||||
// Driver is responsible for deleting publishPath itself.
|
// Driver is responsible for deleting publishPath itself.
|
||||||
// If driver doesn't implement NodeUnstageVolume, detaching the block volume from the node may be done, here.
|
// If driver doesn't implement NodeUnstageVolume, detaching the block volume from the node may be done, here.
|
||||||
if err := csi.NodeUnpublishVolume(ctx, m.volumeID, publishPath); err != nil {
|
if err := csi.NodeUnpublishVolume(ctx, m.volumeID, publishPath); err != nil {
|
||||||
klog.Error(log("blockMapper.unpublishVolumeForBlock failed: %v", err))
|
return errors.New(log("blockMapper.unpublishVolumeForBlock failed: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Infof(log("blockMapper.unpublishVolumeForBlock NodeUnpublished successfully [%s]", publishPath))
|
klog.V(4).Infof(log("blockMapper.unpublishVolumeForBlock NodeUnpublished successfully [%s]", publishPath))
|
||||||
|
|
||||||
@ -304,8 +292,7 @@ func (m *csiBlockMapper) unstageVolumeForBlock(ctx context.Context, csi csiClien
|
|||||||
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
// Check whether "STAGE_UNSTAGE_VOLUME" is set
|
||||||
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
stageUnstageSet, err := csi.NodeSupportsStageUnstage(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.unstageVolumeForBlock failed to check STAGE_UNSTAGE_VOLUME capability: %v", err))
|
return errors.New(log("blockMapper.unstageVolumeForBlock failed to check STAGE_UNSTAGE_VOLUME capability: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
if !stageUnstageSet {
|
if !stageUnstageSet {
|
||||||
klog.Infof(log("blockMapper.unstageVolumeForBlock STAGE_UNSTAGE_VOLUME capability not set. Skipping unstageVolumeForBlock ..."))
|
klog.Infof(log("blockMapper.unstageVolumeForBlock STAGE_UNSTAGE_VOLUME capability not set. Skipping unstageVolumeForBlock ..."))
|
||||||
@ -316,15 +303,13 @@ func (m *csiBlockMapper) unstageVolumeForBlock(ctx context.Context, csi csiClien
|
|||||||
// Expected implementation for driver is removing driver specific resource in stagingPath and
|
// Expected implementation for driver is removing driver specific resource in stagingPath and
|
||||||
// detaching the block volume from the node.
|
// detaching the block volume from the node.
|
||||||
if err := csi.NodeUnstageVolume(ctx, m.volumeID, stagingPath); err != nil {
|
if err := csi.NodeUnstageVolume(ctx, m.volumeID, stagingPath); err != nil {
|
||||||
klog.Errorf(log("blockMapper.unstageVolumeForBlock failed: %v", err))
|
return errors.New(log("blockMapper.unstageVolumeForBlock failed: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Infof(log("blockMapper.unstageVolumeForBlock NodeUnstageVolume successfully [%s]", stagingPath))
|
klog.V(4).Infof(log("blockMapper.unstageVolumeForBlock NodeUnstageVolume successfully [%s]", stagingPath))
|
||||||
|
|
||||||
// Remove stagingPath directory and its contents
|
// Remove stagingPath directory and its contents
|
||||||
if err := os.RemoveAll(stagingPath); err != nil {
|
if err := os.RemoveAll(stagingPath); err != nil {
|
||||||
klog.Error(log("blockMapper.unstageVolumeForBlock failed to remove staging path after NodeUnstageVolume() error [%s]: %v", stagingPath, err))
|
return errors.New(log("blockMapper.unstageVolumeForBlock failed to remove staging path after NodeUnstageVolume() error [%s]: %v", stagingPath, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -343,8 +328,7 @@ func (m *csiBlockMapper) TearDownDevice(globalMapPath, devicePath string) error
|
|||||||
|
|
||||||
csiClient, err := m.csiClientGetter.Get()
|
csiClient, err := m.csiClientGetter.Get()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("blockMapper.TearDownDevice failed to get CSI client: %v", err))
|
return errors.New(log("blockMapper.TearDownDevice failed to get CSI client: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call NodeUnpublishVolume
|
// Call NodeUnpublishVolume
|
||||||
|
@ -123,9 +123,7 @@ func (h *RegistrationHandler) ValidatePlugin(pluginName string, endpoint string,
|
|||||||
// The deprecated dir will only be allowed for a whitelisted set of old versions.
|
// The deprecated dir will only be allowed for a whitelisted set of old versions.
|
||||||
// CSI 1.x drivers should use the /var/lib/kubelet/plugins_registry
|
// CSI 1.x drivers should use the /var/lib/kubelet/plugins_registry
|
||||||
if !isDeprecatedSocketDirAllowed(versions) {
|
if !isDeprecatedSocketDirAllowed(versions) {
|
||||||
err := fmt.Errorf("socket for CSI driver %q versions %v was found in a deprecated dir. Drivers implementing CSI 1.x+ must use the new dir", pluginName, versions)
|
return errors.New(log("socket for CSI driver %q versions %v was found in a deprecated dir. Drivers implementing CSI 1.x+ must use the new dir", pluginName, versions))
|
||||||
klog.Error(err)
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,25 +177,19 @@ func (h *RegistrationHandler) RegisterPlugin(pluginName string, endpoint string,
|
|||||||
|
|
||||||
func (h *RegistrationHandler) validateVersions(callerName, pluginName string, endpoint string, versions []string) (*utilversion.Version, error) {
|
func (h *RegistrationHandler) validateVersions(callerName, pluginName string, endpoint string, versions []string) (*utilversion.Version, error) {
|
||||||
if len(versions) == 0 {
|
if len(versions) == 0 {
|
||||||
err := fmt.Errorf("%s for CSI driver %q failed. Plugin returned an empty list for supported versions", callerName, pluginName)
|
return nil, errors.New(log("%s for CSI driver %q failed. Plugin returned an empty list for supported versions", callerName, pluginName))
|
||||||
klog.Error(err)
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate version
|
// Validate version
|
||||||
newDriverHighestVersion, err := highestSupportedVersion(versions)
|
newDriverHighestVersion, err := highestSupportedVersion(versions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err := fmt.Errorf("%s for CSI driver %q failed. None of the versions specified %q are supported. err=%v", callerName, pluginName, versions, err)
|
return nil, errors.New(log("%s for CSI driver %q failed. None of the versions specified %q are supported. err=%v", callerName, pluginName, versions, err))
|
||||||
klog.Error(err)
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
existingDriver, driverExists := csiDrivers.Get(pluginName)
|
existingDriver, driverExists := csiDrivers.Get(pluginName)
|
||||||
if driverExists {
|
if driverExists {
|
||||||
if !existingDriver.highestSupportedVersion.LessThan(newDriverHighestVersion) {
|
if !existingDriver.highestSupportedVersion.LessThan(newDriverHighestVersion) {
|
||||||
err := fmt.Errorf("%s for CSI driver %q failed. Another driver with the same name is already registered with a higher supported version: %q", callerName, pluginName, existingDriver.highestSupportedVersion)
|
return nil, errors.New(log("%s for CSI driver %q failed. Another driver with the same name is already registered with a higher supported version: %q", callerName, pluginName, existingDriver.highestSupportedVersion))
|
||||||
klog.Error(err)
|
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +251,7 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
|
|||||||
// This function prevents Kubelet from posting Ready status until CSINodeInfo
|
// This function prevents Kubelet from posting Ready status until CSINodeInfo
|
||||||
// is both installed and initialized
|
// is both installed and initialized
|
||||||
if err := initializeCSINode(host); err != nil {
|
if err := initializeCSINode(host); err != nil {
|
||||||
return fmt.Errorf("failed to initialize CSINodeInfo: %v", err)
|
return errors.New(log("failed to initialize CSINodeInfo: %v", err))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,8 +318,7 @@ func (p *csiPlugin) GetPluginName() string {
|
|||||||
func (p *csiPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
|
func (p *csiPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
|
||||||
csi, err := getPVSourceFromSpec(spec)
|
csi, err := getPVSourceFromSpec(spec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("plugin.GetVolumeName failed to extract volume source from spec: %v", err))
|
return "", errors.New(log("plugin.GetVolumeName failed to extract volume source from spec: %v", err))
|
||||||
return "", err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// return driverName<separator>volumeHandle
|
// return driverName<separator>volumeHandle
|
||||||
@ -384,7 +375,7 @@ func (p *csiPlugin) NewMounter(
|
|||||||
volumeHandle = pvSrc.VolumeHandle
|
volumeHandle = pvSrc.VolumeHandle
|
||||||
readOnly = spec.ReadOnly
|
readOnly = spec.ReadOnly
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("volume source not found in volume.Spec")
|
return nil, errors.New(log("volume source not found in volume.Spec"))
|
||||||
}
|
}
|
||||||
|
|
||||||
csiVolumeMode, err := p.getCSIVolumeMode(spec)
|
csiVolumeMode, err := p.getCSIVolumeMode(spec)
|
||||||
@ -399,14 +390,12 @@ func (p *csiPlugin) NewMounter(
|
|||||||
|
|
||||||
k8s := p.host.GetKubeClient()
|
k8s := p.host.GetKubeClient()
|
||||||
if k8s == nil {
|
if k8s == nil {
|
||||||
klog.Error(log("failed to get a kubernetes client"))
|
return nil, errors.New(log("failed to get a kubernetes client"))
|
||||||
return nil, errors.New("failed to get a Kubernetes client")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kvh, ok := p.host.(volume.KubeletVolumeHost)
|
kvh, ok := p.host.(volume.KubeletVolumeHost)
|
||||||
if !ok {
|
if !ok {
|
||||||
klog.Error(log("cast from VolumeHost to KubeletVolumeHost failed"))
|
return nil, errors.New(log("cast from VolumeHost to KubeletVolumeHost failed"))
|
||||||
return nil, errors.New("cast from VolumeHost to KubeletVolumeHost failed")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mounter := &csiMountMgr{
|
mounter := &csiMountMgr{
|
||||||
@ -429,8 +418,7 @@ func (p *csiPlugin) NewMounter(
|
|||||||
dataDir := path.Dir(dir) // dropoff /mount at end
|
dataDir := path.Dir(dir) // dropoff /mount at end
|
||||||
|
|
||||||
if err := os.MkdirAll(dataDir, 0750); err != nil {
|
if err := os.MkdirAll(dataDir, 0750); err != nil {
|
||||||
klog.Error(log("failed to create dir %#v: %v", dataDir, err))
|
return nil, errors.New(log("failed to create dir %#v: %v", dataDir, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("created path successfully [%s]", dataDir))
|
klog.V(4).Info(log("created path successfully [%s]", dataDir))
|
||||||
|
|
||||||
@ -450,11 +438,10 @@ func (p *csiPlugin) NewMounter(
|
|||||||
volData[volDataKey.attachmentID] = attachID
|
volData[volDataKey.attachmentID] = attachID
|
||||||
|
|
||||||
if err := saveVolumeData(dataDir, volDataFileName, volData); err != nil {
|
if err := saveVolumeData(dataDir, volDataFileName, volData); err != nil {
|
||||||
klog.Error(log("failed to save volume info data: %v", err))
|
|
||||||
if removeErr := os.RemoveAll(dataDir); removeErr != nil {
|
if removeErr := os.RemoveAll(dataDir); removeErr != nil {
|
||||||
klog.Error(log("failed to remove dir after error [%s]: %v", dataDir, removeErr))
|
klog.Error(log("failed to remove dir after error [%s]: %v", dataDir, removeErr))
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, errors.New(log("failed to save volume info data: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Info(log("mounter created successfully"))
|
klog.V(4).Info(log("mounter created successfully"))
|
||||||
@ -467,8 +454,7 @@ func (p *csiPlugin) NewUnmounter(specName string, podUID types.UID) (volume.Unmo
|
|||||||
|
|
||||||
kvh, ok := p.host.(volume.KubeletVolumeHost)
|
kvh, ok := p.host.(volume.KubeletVolumeHost)
|
||||||
if !ok {
|
if !ok {
|
||||||
klog.Error(log("cast from VolumeHost to KubeletVolumeHost failed"))
|
return nil, errors.New(log("cast from VolumeHost to KubeletVolumeHost failed"))
|
||||||
return nil, errors.New("cast from VolumeHost to KubeletVolumeHost failed")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unmounter := &csiMountMgr{
|
unmounter := &csiMountMgr{
|
||||||
@ -483,8 +469,7 @@ func (p *csiPlugin) NewUnmounter(specName string, podUID types.UID) (volume.Unmo
|
|||||||
dataDir := path.Dir(dir) // dropoff /mount at end
|
dataDir := path.Dir(dir) // dropoff /mount at end
|
||||||
data, err := loadVolumeData(dataDir, volDataFileName)
|
data, err := loadVolumeData(dataDir, volDataFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("unmounter failed to load volume data file [%s]: %v", dir, err))
|
return nil, errors.New(log("unmounter failed to load volume data file [%s]: %v", dir, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
unmounter.driverName = csiDriverName(data[volDataKey.driverName])
|
unmounter.driverName = csiDriverName(data[volDataKey.driverName])
|
||||||
unmounter.volumeID = data[volDataKey.volHandle]
|
unmounter.volumeID = data[volDataKey.volHandle]
|
||||||
@ -498,8 +483,7 @@ func (p *csiPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.S
|
|||||||
|
|
||||||
volData, err := loadVolumeData(mountPath, volDataFileName)
|
volData, err := loadVolumeData(mountPath, volDataFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("plugin.ConstructVolumeSpec failed loading volume data using [%s]: %v", mountPath, err))
|
return nil, errors.New(log("plugin.ConstructVolumeSpec failed loading volume data using [%s]: %v", mountPath, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Info(log("plugin.ConstructVolumeSpec extracted [%#v]", volData))
|
klog.V(4).Info(log("plugin.ConstructVolumeSpec extracted [%#v]", volData))
|
||||||
@ -664,8 +648,7 @@ func (p *csiPlugin) NewBlockVolumeMapper(spec *volume.Spec, podRef *api.Pod, opt
|
|||||||
|
|
||||||
k8s := p.host.GetKubeClient()
|
k8s := p.host.GetKubeClient()
|
||||||
if k8s == nil {
|
if k8s == nil {
|
||||||
klog.Error(log("failed to get a kubernetes client"))
|
return nil, errors.New(log("failed to get a kubernetes client"))
|
||||||
return nil, errors.New("failed to get a Kubernetes client")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mapper := &csiBlockMapper{
|
mapper := &csiBlockMapper{
|
||||||
@ -684,8 +667,7 @@ func (p *csiPlugin) NewBlockVolumeMapper(spec *volume.Spec, podRef *api.Pod, opt
|
|||||||
dataDir := getVolumeDeviceDataDir(spec.Name(), p.host)
|
dataDir := getVolumeDeviceDataDir(spec.Name(), p.host)
|
||||||
|
|
||||||
if err := os.MkdirAll(dataDir, 0750); err != nil {
|
if err := os.MkdirAll(dataDir, 0750); err != nil {
|
||||||
klog.Error(log("failed to create data dir %s: %v", dataDir, err))
|
return nil, errors.New(log("failed to create data dir %s: %v", dataDir, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("created path successfully [%s]", dataDir))
|
klog.V(4).Info(log("created path successfully [%s]", dataDir))
|
||||||
|
|
||||||
@ -701,11 +683,10 @@ func (p *csiPlugin) NewBlockVolumeMapper(spec *volume.Spec, podRef *api.Pod, opt
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err := saveVolumeData(dataDir, volDataFileName, volData); err != nil {
|
if err := saveVolumeData(dataDir, volDataFileName, volData); err != nil {
|
||||||
klog.Error(log("failed to save volume info data: %v", err))
|
|
||||||
if removeErr := os.RemoveAll(dataDir); removeErr != nil {
|
if removeErr := os.RemoveAll(dataDir); removeErr != nil {
|
||||||
klog.Error(log("failed to remove dir after error [%s]: %v", dataDir, removeErr))
|
klog.Error(log("failed to remove dir after error [%s]: %v", dataDir, removeErr))
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, errors.New(log("failed to save volume info data: %v", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapper, nil
|
return mapper, nil
|
||||||
@ -727,8 +708,7 @@ func (p *csiPlugin) NewBlockVolumeUnmapper(volName string, podUID types.UID) (vo
|
|||||||
dataDir := getVolumeDeviceDataDir(unmapper.specName, p.host)
|
dataDir := getVolumeDeviceDataDir(unmapper.specName, p.host)
|
||||||
data, err := loadVolumeData(dataDir, volDataFileName)
|
data, err := loadVolumeData(dataDir, volDataFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("unmapper failed to load volume data file [%s]: %v", dataDir, err))
|
return nil, errors.New(log("unmapper failed to load volume data file [%s]: %v", dataDir, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
unmapper.driverName = csiDriverName(data[volDataKey.driverName])
|
unmapper.driverName = csiDriverName(data[volDataKey.driverName])
|
||||||
unmapper.volumeID = data[volDataKey.volHandle]
|
unmapper.volumeID = data[volDataKey.volHandle]
|
||||||
@ -747,8 +727,7 @@ func (p *csiPlugin) ConstructBlockVolumeSpec(podUID types.UID, specVolName, mapP
|
|||||||
dataDir := getVolumeDeviceDataDir(specVolName, p.host)
|
dataDir := getVolumeDeviceDataDir(specVolName, p.host)
|
||||||
volData, err := loadVolumeData(dataDir, volDataFileName)
|
volData, err := loadVolumeData(dataDir, volDataFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("plugin.ConstructBlockVolumeSpec failed loading volume data using [%s]: %v", mapPath, err))
|
return nil, errors.New(log("plugin.ConstructBlockVolumeSpec failed loading volume data using [%s]: %v", mapPath, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
klog.V(4).Info(log("plugin.ConstructBlockVolumeSpec extracted [%#v]", volData))
|
klog.V(4).Info(log("plugin.ConstructBlockVolumeSpec extracted [%#v]", volData))
|
||||||
@ -846,8 +825,7 @@ func (p *csiPlugin) getPublishContext(client clientset.Interface, handle, driver
|
|||||||
func (p *csiPlugin) newAttacherDetacher() (*csiAttacher, error) {
|
func (p *csiPlugin) newAttacherDetacher() (*csiAttacher, error) {
|
||||||
k8s := p.host.GetKubeClient()
|
k8s := p.host.GetKubeClient()
|
||||||
if k8s == nil {
|
if k8s == nil {
|
||||||
klog.Error(log("unable to get kubernetes client from host"))
|
return nil, errors.New(log("unable to get kubernetes client from host"))
|
||||||
return nil, errors.New("unable to get Kubernetes client")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return &csiAttacher{
|
return &csiAttacher{
|
||||||
@ -861,8 +839,7 @@ func unregisterDriver(driverName string) error {
|
|||||||
csiDrivers.Delete(driverName)
|
csiDrivers.Delete(driverName)
|
||||||
|
|
||||||
if err := nim.UninstallCSIDriver(driverName); err != nil {
|
if err := nim.UninstallCSIDriver(driverName); err != nil {
|
||||||
klog.Errorf("Error uninstalling CSI driver: %v", err)
|
return errors.New(log("Error uninstalling CSI driver: %v", err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -871,7 +848,7 @@ func unregisterDriver(driverName string) error {
|
|||||||
// Return the highest supported version
|
// Return the highest supported version
|
||||||
func highestSupportedVersion(versions []string) (*utilversion.Version, error) {
|
func highestSupportedVersion(versions []string) (*utilversion.Version, error) {
|
||||||
if len(versions) == 0 {
|
if len(versions) == 0 {
|
||||||
return nil, fmt.Errorf("CSI driver reporting empty array for supported versions")
|
return nil, errors.New(log("CSI driver reporting empty array for supported versions"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort by lowest to highest version
|
// Sort by lowest to highest version
|
||||||
@ -902,7 +879,7 @@ func highestSupportedVersion(versions []string) (*utilversion.Version, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, fmt.Errorf("None of the CSI versions reported by this driver are supported")
|
return nil, errors.New(log("None of the CSI versions reported by this driver are supported"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only drivers that implement CSI 0.x are allowed to use deprecated socket dir.
|
// Only drivers that implement CSI 0.x are allowed to use deprecated socket dir.
|
||||||
|
@ -18,6 +18,7 @@ package csi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -44,8 +45,7 @@ func getCredentialsFromSecret(k8s kubernetes.Interface, secretRef *api.SecretRef
|
|||||||
credentials := map[string]string{}
|
credentials := map[string]string{}
|
||||||
secret, err := k8s.CoreV1().Secrets(secretRef.Namespace).Get(secretRef.Name, meta.GetOptions{})
|
secret, err := k8s.CoreV1().Secrets(secretRef.Namespace).Get(secretRef.Name, meta.GetOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Errorf("failed to find the secret %s in the namespace %s with error: %v\n", secretRef.Name, secretRef.Namespace, err)
|
return credentials, errors.New(log("failed to find the secret %s in the namespace %s with error: %v", secretRef.Name, secretRef.Namespace, err))
|
||||||
return credentials, err
|
|
||||||
}
|
}
|
||||||
for key, value := range secret.Data {
|
for key, value := range secret.Data {
|
||||||
credentials[key] = string(value)
|
credentials[key] = string(value)
|
||||||
@ -60,13 +60,11 @@ func saveVolumeData(dir string, fileName string, data map[string]string) error {
|
|||||||
klog.V(4).Info(log("saving volume data file [%s]", dataFilePath))
|
klog.V(4).Info(log("saving volume data file [%s]", dataFilePath))
|
||||||
file, err := os.Create(dataFilePath)
|
file, err := os.Create(dataFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("failed to save volume data file %s: %v", dataFilePath, err))
|
return errors.New(log("failed to save volume data file %s: %v", dataFilePath, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
if err := json.NewEncoder(file).Encode(data); err != nil {
|
if err := json.NewEncoder(file).Encode(data); err != nil {
|
||||||
klog.Error(log("failed to save volume data file %s: %v", dataFilePath, err))
|
return errors.New(log("failed to save volume data file %s: %v", dataFilePath, err))
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
klog.V(4).Info(log("volume data file saved successfully [%s]", dataFilePath))
|
klog.V(4).Info(log("volume data file saved successfully [%s]", dataFilePath))
|
||||||
return nil
|
return nil
|
||||||
@ -80,14 +78,12 @@ func loadVolumeData(dir string, fileName string) (map[string]string, error) {
|
|||||||
|
|
||||||
file, err := os.Open(dataFileName)
|
file, err := os.Open(dataFileName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("failed to open volume data file [%s]: %v", dataFileName, err))
|
return nil, errors.New(log("failed to open volume data file [%s]: %v", dataFileName, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
data := map[string]string{}
|
data := map[string]string{}
|
||||||
if err := json.NewDecoder(file).Decode(&data); err != nil {
|
if err := json.NewDecoder(file).Decode(&data); err != nil {
|
||||||
klog.Error(log("failed to parse volume data file [%s]: %v", dataFileName, err))
|
return nil, errors.New(log("failed to parse volume data file [%s]: %v", dataFileName, err))
|
||||||
return nil, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return data, nil
|
return data, nil
|
||||||
|
@ -18,6 +18,7 @@ package csi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
api "k8s.io/api/core/v1"
|
api "k8s.io/api/core/v1"
|
||||||
@ -44,8 +45,7 @@ func (c *csiPlugin) NodeExpand(resizeOptions volume.NodeResizeOptions) (bool, er
|
|||||||
klog.V(4).Infof(log("Expander.NodeExpand(%s)", resizeOptions.DeviceMountPath))
|
klog.V(4).Infof(log("Expander.NodeExpand(%s)", resizeOptions.DeviceMountPath))
|
||||||
csiSource, err := getCSISourceFromSpec(resizeOptions.VolumeSpec)
|
csiSource, err := getCSISourceFromSpec(resizeOptions.VolumeSpec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Error(log("Expander.NodeExpand failed to get CSI persistent source: %v", err))
|
return false, errors.New(log("Expander.NodeExpand failed to get CSI persistent source: %v", err))
|
||||||
return false, err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
csClient, err := newCsiDriverClient(csiDriverName(csiSource.Driver))
|
csClient, err := newCsiDriverClient(csiDriverName(csiSource.Driver))
|
||||||
|
Loading…
Reference in New Issue
Block a user