From 28138dafcc391b0d03633ee9c8e23ebc229842ba Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Mon, 21 Dec 2020 11:37:12 +0800 Subject: 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 --- libpod/runtime_volume_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod/runtime_volume_linux.go') 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) -- cgit v1.2.3-54-g00ecf