Skip to content

Commit 7474318

Browse files
committed
cinder-csi-plugin: Handle potentially unset volCtx arg
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
1 parent 87d670c commit 7474318

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/csi/cinder/controllerserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,6 +1063,10 @@ func getTopology(vol *volumes.Volume, topologyReq *csi.TopologyRequirement, with
10631063
func getCreateVolumeResponse(vol *volumes.Volume, volCtx map[string]string, accessibleTopology []*csi.Topology) *csi.CreateVolumeResponse {
10641064
var volSrc *csi.VolumeContentSource
10651065

1066+
if volCtx == nil {
1067+
volCtx = map[string]string{}
1068+
}
1069+
10661070
if vol.SnapshotID != "" {
10671071
volCtx[ResizeRequired] = "true"
10681072

0 commit comments

Comments
 (0)