diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-23 16:40:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 16:40:22 +0100 |
commit | 0778c114d3001bdd4f40fe46283457481d983b64 (patch) | |
tree | 8f7899db5c874eed3a8fc4de1a4d6c551530572f /pkg/domain/infra/abi/parse | |
parent | 3728ca9e8ded1b63b0f90f3ca5fbf0dc681b1f5d (diff) | |
parent | 28138dafcc391b0d03633ee9c8e23ebc229842ba (diff) | |
download | podman-0778c114d3001bdd4f40fe46283457481d983b64.tar.gz podman-0778c114d3001bdd4f40fe46283457481d983b64.tar.bz2 podman-0778c114d3001bdd4f40fe46283457481d983b64.zip |
Merge pull request #8793 from zhangguanzhang/vol-op
Fix missing options in volume's display while setting uid and gid
Diffstat (limited to 'pkg/domain/infra/abi/parse')
-rw-r--r-- | pkg/domain/infra/abi/parse/parse.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/parse/parse.go b/pkg/domain/infra/abi/parse/parse.go index 37568ea11..6a6380e33 100644 --- a/pkg/domain/infra/abi/parse/parse.go +++ b/pkg/domain/infra/abi/parse/parse.go @@ -38,6 +38,9 @@ func VolumeOptions(opts map[string]string) ([]libpod.VolumeCreateOption, error) } logrus.Debugf("Removing uid= from options and adding WithVolumeUID for UID %d", intUID) libpodOptions = append(libpodOptions, libpod.WithVolumeUID(intUID)) + finalVal = append(finalVal, o) + // set option "UID": "$uid" + volumeOptions["UID"] = splitO[1] case "gid": if len(splitO) != 2 { return nil, errors.Wrapf(define.ErrInvalidArg, "gid option must provide a GID") @@ -48,6 +51,9 @@ func VolumeOptions(opts map[string]string) ([]libpod.VolumeCreateOption, error) } logrus.Debugf("Removing gid= from options and adding WithVolumeGID for GID %d", intGID) libpodOptions = append(libpodOptions, libpod.WithVolumeGID(intGID)) + finalVal = append(finalVal, o) + // set option "GID": "$gid" + volumeOptions["GID"] = splitO[1] default: finalVal = append(finalVal, o) } |