Skip to content

Commit

Permalink
Merge pull request #76961 from harsh-px/automated-cherry-pick-of-#763…
Browse files Browse the repository at this point in the history
…41-upstream-release-1.13

Automated cherry pick of #76341: Fix concurrent map access in Portworx create volume call
  • Loading branch information
k8s-ci-robot committed May 2, 2019
2 parents 300fede + f976da6 commit 798e669
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/volume/portworx/portworx_util.go
Expand Up @@ -72,12 +72,14 @@ func (util *portworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
}

// Pass all parameters as volume labels for Portworx server-side processing
if len(p.options.Parameters) > 0 {
spec.VolumeLabels = p.options.Parameters
} else {
if spec.VolumeLabels == nil {
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
spec.Size = uint64(requestGiB * volutil.GIB)

Expand Down

0 comments on commit 798e669

Please sign in to comment.