summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2020-12-01 14:51:11 -0500
committerMatthew Heon <mheon@redhat.com>2020-12-01 15:12:50 -0500
commitbf6b22809219da03334fe9d5b84d540c39daf151 (patch)
tree5681e6078452159f2237274e952216bdbda957b7 /pkg
parentce45b71dcfe7e5e0fd7ab43b9eeb4834317e6443 (diff)
downloadpodman-bf6b22809219da03334fe9d5b84d540c39daf151.tar.gz
podman-bf6b22809219da03334fe9d5b84d540c39daf151.tar.bz2
podman-bf6b22809219da03334fe9d5b84d540c39daf151.zip
Do not use "true" after "syslog" in exit commands
Instead of being interpreted as an argument to the boolean flag, the 'true' is being intepreted as the Podman command to be run - so we're trying to run `podman true`, which does not exist. This causes the cleanup command to fail when `--log-level=debug` is set, so containers are not cleaned up or removed. This problem is easily reproduced with any command combining the `--rm`, `-d`, and `--log-level=debug` flags - the command will execute and exit, but the container will not be removed. Separate, but worth looking into later: the errors we get on trying `podman true` with any flags are terrible - if you just type `podman true` you get a quite sane "Unrecognized command" error, but if you try `podman true --rm` you get an "unknown flag --rm" error - which makes very little sense given the command itself doesn't exist. Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/container_create.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 45a374216..95e4eeb8f 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -388,7 +388,7 @@ func CreateExitCommandArgs(storageConfig storage.StoreOptions, config *config.Co
}
if syslog {
- command = append(command, "--syslog", "true")
+ command = append(command, "--syslog")
}
command = append(command, []string{"container", "cleanup"}...)