Unverified Commit c7a9a150 authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #74493 from cofyc/fix74384

Fix panic because VolumeSpec may be nil in volume reconstruction scenario
parents 8326ea71 618917e2
...@@ -732,7 +732,7 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc( ...@@ -732,7 +732,7 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc(
podsDir string) (volumetypes.GeneratedOperations, error) { podsDir string) (volumetypes.GeneratedOperations, error) {
var pluginName string var pluginName string
if useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) { if volumeToUnmount.VolumeSpec != nil && useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) {
pluginName = csi.CSIPluginName pluginName = csi.CSIPluginName
} else { } else {
pluginName = volumeToUnmount.PluginName pluginName = volumeToUnmount.PluginName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment