Skip to content

Commit c7a9a15

Browse files
authored
Merge pull request kubernetes#74493 from cofyc/fix74384
Fix panic because VolumeSpec may be nil in volume reconstruction scenario
2 parents 8326ea7 + 618917e commit c7a9a15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/volume/util/operationexecutor/operation_generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc(
732732
podsDir string) (volumetypes.GeneratedOperations, error) {
733733

734734
var pluginName string
735-
if useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) {
735+
if volumeToUnmount.VolumeSpec != nil && useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) {
736736
pluginName = csi.CSIPluginName
737737
} else {
738738
pluginName = volumeToUnmount.PluginName

0 commit comments

Comments
 (0)