Skip to content

Commit 8de2e0e

Browse files
committed
sigproxy: ignore if container already removed
If the container is already removed do not log a warning as this happens in parallel so it is possible the container was already removed. The flake was shown in #26017. Signed-off-by: Paul Holzinger <[email protected]>
1 parent 9ce7087 commit 8de2e0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/domain/infra/abi/terminal/sigproxy_commn.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ func ProxySignals(ctr *libpod.Container) {
3333
}
3434

3535
if err := ctr.Kill(uint(syscallSignal)); err != nil {
36-
if errors.Is(err, define.ErrCtrStateInvalid) {
36+
// If the container is no longer running/removed do not log it as error.
37+
if errors.Is(err, define.ErrCtrStateInvalid) || errors.Is(err, define.ErrNoSuchCtr) || errors.Is(err, define.ErrCtrRemoved) {
3738
logrus.Infof("Ceasing signal forwarding to container %s as it has stopped", ctr.ID())
3839
} else {
3940
logrus.Errorf("forwarding signal %d to container %s: %v", s, ctr.ID(), err)

0 commit comments

Comments
 (0)