opencontainers / opencontainers/runc
I don't see runc calling its poststop hooks when it is stopping a container.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
sh-4.4# podman stop alice_gold2
448c048639989b307e7ceb089f7396d9807e170386d340e00fd1d12f30ced165
This calls runc kill 448c048639989b307e7ceb089f7396d9807e170386d340e00fd1d12f30ced165 TERMINATE
sh-4.4# journalctl -b | grep oci-register | grep 448
May 04 15:41:47 localhost.localdomain oci-register-machine[24860]: 2018/05/04 15:41:47 Register machine: prestart 448c048639989b307e7ceb089f7396d9807e170386d340e00fd1d12f30ced165 24854
Journal only shows that oci-register-machine was called in prestart
runc list | grep ^448
448c048639989b307e7ceb089f7396d9807e170386d340e00fd1d12f30ced165 0 stopped /var/lib/containers/storage/overlay-containers/448c048639989b307e7ceb089f7396d9807e170386d340e00fd1d12f30ced165/userdata 2018-05-04T19:41:47.127501532Z root
runc shows that the container was stopped
Here is the poststop section of the spec file.
"poststop": [
{
"path": "/usr/libexec/oci/hooks.d/oci-register-machine",
"args": [
"/usr/libexec/oci/hooks.d/oci-register-machine"
],
"env": [
"stage=poststop"
]
},
{
"path": "/usr/libexec/oci/hooks.d/oci-systemd-hook",
"args": [
"/usr/libexec/oci/hooks.d/oci-systemd-hook"
],
"env": [
"stage=poststop"
]
}
]
Any ideas?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the container stop with podman stop and inspect journalctl output for the container ID, then compare it with runc list and the poststop section of the OCI spec. Done means determining whether the listed poststop hooks run after runc kill TERMINATE and documenting or fixing the missing hook invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100