From 670f7c271f8f308b057b0e05da376b4e92d0e5e3 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 1 Jun 2020 07:58:50 -0700 Subject: Add invalid value to error message Signed-off-by: Jhon Honce --- pkg/specgen/container_validate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/specgen') diff --git a/pkg/specgen/container_validate.go b/pkg/specgen/container_validate.go index 94e456c52..75da38c0e 100644 --- a/pkg/specgen/container_validate.go +++ b/pkg/specgen/container_validate.go @@ -50,7 +50,8 @@ func (s *SpecGenerator) Validate() error { } // imagevolumemode must be one of ignore, tmpfs, or anonymous if given if len(s.ContainerStorageConfig.ImageVolumeMode) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerStorageConfig.ImageVolumeMode), ImageVolumeModeValues) { - return errors.Errorf("ImageVolumeMode values must be one of %s", strings.Join(ImageVolumeModeValues, ",")) + return errors.Errorf("invalid ImageVolumeMode %q, value must be one of %s", + s.ContainerStorageConfig.ImageVolumeMode, strings.Join(ImageVolumeModeValues, ",")) } // shmsize conflicts with IPC namespace if s.ContainerStorageConfig.ShmSize != nil && !s.ContainerStorageConfig.IpcNS.IsPrivate() { -- cgit v1.2.3-54-g00ecf