docker icon indicating copy to clipboard operation
docker copied to clipboard

Workaround for inconsistency container status

Open shawn111 opened this issue 5 years ago • 5 comments

- What I did Fix stopped container still report as running.

- How I did it When containerd restarted, check correct container running status

- How to verify it

# dockerd-> containerd -> containerd-shim -> <runc_container_process>

$ docker run xxx
$ docker ps  ## correct, shows one container is up

# simulate the heavy scenario
$ kill -STOP <dockerd_PID>

$ kill <docker-containerd-shim_PID> or kill <runc_container_process_PID>
$ kill <docker-containerd_PID>

$ kill -CONT <dockerd_PID>
$ docker ps  ## wrong, still shows one container is up

After, apply the patch, the final docker ps could be correct.

Reference issue:

  • https://github.com/moby/moby/issues/38501

shawn111 avatar Mar 25 '19 14:03 shawn111

Can one of the admins verify this patch? I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

rh-atomic-bot avatar Mar 25 '19 14:03 rh-atomic-bot

bot, add author to whitelist LGTM You need to sign your commit

git commit -a --amend -s git push --force

Was this a backport from upstream?

rhatdan avatar Mar 26 '19 10:03 rhatdan

Hi @rhatdan,

Not, it is not from upstream. Maybe I should send another PR for upstream.

Thanks for your review.

shawn111 avatar Mar 26 '19 15:03 shawn111

Yes send it to them and get their approval.

rhatdan avatar Mar 27 '19 10:03 rhatdan

Hopefully we don't have this inconsistency in Podman.

rhatdan avatar Mar 27 '19 10:03 rhatdan