remote: don't print bogus error when starting container attached

This looks like debug leftover, in any case this is not an error so
simply remove the line.

Fixes #25965

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-04-24 14:29:43 +02:00
parent bc81470714
commit 3a2d7587fe
2 changed files with 14 additions and 1 deletions

View File

@ -806,7 +806,6 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
logrus.Errorf("Failed to check if %s should restart: %v", ctr.ID, err)
return
}
logrus.Errorf("Should restart: %v", shouldRestart)
if !shouldRestart && ctr.AutoRemove {
removeContainer(ctr.ID, ctr.CIDFile)

View File

@ -149,4 +149,18 @@ load helpers
run_podman rm -t 0 -f $ctrID $cname
}
# Regression test for https://github.com/containers/podman/issues/25965
# bats test_tags=ci:parallel
@test "podman start attach with created --rm container" {
local msg=c-$(safename)
run_podman create --rm $IMAGE echo "$msg"
cid="$output"
run_podman start -a $cid
assert "$output" == "$msg" "attach printed the expected output"
# container must be removed on its own as it was created with --rm
run_podman 1 container exists $cid
}
# vim: filetype=sh