mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #76341 from harsh-px/fix-concurrent-access-master
Fix concurrent map write access in Portworx create volume call
This commit is contained in:
commit
d424bedc9b
@ -72,12 +72,14 @@ func (util *portworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Pass all parameters as volume labels for Portworx server-side processing
|
// Pass all parameters as volume labels for Portworx server-side processing
|
||||||
if len(p.options.Parameters) > 0 {
|
if spec.VolumeLabels == nil {
|
||||||
spec.VolumeLabels = p.options.Parameters
|
|
||||||
} else {
|
|
||||||
spec.VolumeLabels = make(map[string]string, 0)
|
spec.VolumeLabels = make(map[string]string, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for k, v := range p.options.Parameters {
|
||||||
|
spec.VolumeLabels[k] = v
|
||||||
|
}
|
||||||
|
|
||||||
// Update the requested size in the spec
|
// Update the requested size in the spec
|
||||||
spec.Size = uint64(requestGiB * volumehelpers.GiB)
|
spec.Size = uint64(requestGiB * volumehelpers.GiB)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user