mirror of https://github.com/containers/podman.git
specgen: fix error message
the check is correct but the error message was stating the opposite. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
36039a38ea
commit
23d431f0bf
|
@ -34,7 +34,7 @@ func (s *SpecGenerator) Validate() error {
|
||||||
}
|
}
|
||||||
// Cannot set hostname and utsns
|
// Cannot set hostname and utsns
|
||||||
if len(s.ContainerBasicConfig.Hostname) > 0 && !s.ContainerBasicConfig.UtsNS.IsPrivate() {
|
if len(s.ContainerBasicConfig.Hostname) > 0 && !s.ContainerBasicConfig.UtsNS.IsPrivate() {
|
||||||
return errors.Wrap(ErrInvalidSpecConfig, "cannot set hostname when creating an UTS namespace")
|
return errors.Wrap(ErrInvalidSpecConfig, "cannot set hostname when running in the host UTS namespace")
|
||||||
}
|
}
|
||||||
// systemd values must be true, false, or always
|
// systemd values must be true, false, or always
|
||||||
if len(s.ContainerBasicConfig.Systemd) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerBasicConfig.Systemd), SystemDValues) {
|
if len(s.ContainerBasicConfig.Systemd) > 0 && !util.StringInSlice(strings.ToLower(s.ContainerBasicConfig.Systemd), SystemDValues) {
|
||||||
|
|
Loading…
Reference in New Issue