summaryrefslogtreecommitdiff
path: root/libpod/runtime_volume_linux.go
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-12-21 11:37:12 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-12-23 09:13:20 +0800
commit28138dafcc391b0d03633ee9c8e23ebc229842ba (patch)
treed373363d0d597c9e937afb3b4b6865f9950b645e /libpod/runtime_volume_linux.go
parent5c6b5ef34905f40562b518799c35be8d06694e65 (diff)
downloadpodman-28138dafcc391b0d03633ee9c8e23ebc229842ba.tar.gz
podman-28138dafcc391b0d03633ee9c8e23ebc229842ba.tar.bz2
podman-28138dafcc391b0d03633ee9c8e23ebc229842ba.zip
Fix missing options in volumes display while setting uid and gid
``` $ podman volume create testvol --opt o=uid=1001,gid=1001 $ ./bin/podman volume create testvol2 --opt o=uid=1001,gid=1001 $ podman volume inspect testvol "Options": {}, $ podman volume inspect testvol2 "Options": { "GID": "1001", "UID": "1001", "o": "uid=1001,gid=1001" }, ``` Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
-rw-r--r--libpod/runtime_volume_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index e1877b17d..9bf0fd108 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -58,7 +58,7 @@ func (r *Runtime) newVolume(ctx context.Context, options ...VolumeCreateOption)
// Validate options
for key := range volume.config.Options {
switch key {
- case "device", "o", "type":
+ case "device", "o", "type", "UID", "GID":
// Do nothing, valid keys
default:
return nil, errors.Wrapf(define.ErrInvalidArg, "invalid mount option %s for driver 'local'", key)