Move nil check for mapperPlugin earlier in reconstructVolume

This commit is contained in:
Masaki Kimura
2019-08-01 20:36:21 +00:00
parent 2306d2ff31
commit c130b77a48
2 changed files with 19 additions and 22 deletions

View File

@@ -899,13 +899,7 @@ func (oe *operationExecutor) ReconstructVolumeOperation(
// Block Volume case
// Create volumeSpec from mount path
klog.V(5).Infof("Starting operationExecutor.ReconstructVolume")
if mapperPlugin == nil {
return nil, fmt.Errorf("Could not find block volume plugin %q (spec.Name: %q) pod %q (UID: %q)",
pluginName,
volumeSpecName,
podName,
uid)
}
// volumePath contains volumeName on the path. In the case of block volume, {volumeName} is symbolic link
// corresponding to raw block device.
// ex. volumePath: pods/{podUid}}/{DefaultKubeletVolumeDevicesDirName}/{escapeQualifiedPluginName}/{volumeName}