summaryrefslogtreecommitdiff
path: root/pkg/specgen/container_validate.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-01 20:44:48 +0200
committerGitHub <noreply@github.com>2020-06-01 20:44:48 +0200
commite92a65f38c2b27cd9491d8136f2a3cdaa926cea4 (patch)
tree5267456f4a4519f784b8ecee545267fed56609a4 /pkg/specgen/container_validate.go
parent7c41cb7802b440e09b1c8a62632cda9de2208ac2 (diff)
parent670f7c271f8f308b057b0e05da376b4e92d0e5e3 (diff)
downloadpodman-e92a65f38c2b27cd9491d8136f2a3cdaa926cea4.tar.gz
podman-e92a65f38c2b27cd9491d8136f2a3cdaa926cea4.tar.bz2
podman-e92a65f38c2b27cd9491d8136f2a3cdaa926cea4.zip
Merge pull request #6453 from jwhonce/wip/errors
Add invalid value to error message
Diffstat (limited to 'pkg/specgen/container_validate.go')
-rw-r--r--pkg/specgen/container_validate.go3
1 files changed, 2 insertions, 1 deletions
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() {