fix: write runtime pidfile when provided#439
fix: write runtime pidfile when provided#439sidneychang wants to merge 1 commit intourunc-dev:mainfrom
Conversation
✅ Deploy Preview for urunc canceled.
|
ee7cdfe to
32401ed
Compare
Ensure the PID is written to the runtime-provided --pid-file after container creation. This allows supervisors like `conmon` to track and reap the container process correctly, preventing early cleanup or EOF failures. This change also ensures that Podman can reliably start urunc containers. Signed-off-by: sidneychang <2190206983@qq.com>
32401ed to
9622e2a
Compare
cmainas
left a comment
There was a problem hiding this comment.
Thank you a lot @sidneychang for this fix!
I think we can make the patch even smaller. We can simply add the pid file apth as an extra argument in unikontainers.Create https://github.com/sidneychang/urunc/blob/9622e2a938b1a911f176eee2d6a0fa00e92ae09b/cmd/urunc/create.go#L257
Inside Create if the pid file path is not specified we can simply use the default value otherwise the argument passed.
I agree with this approach, and I actually considered something similar. My only hesitation was whether we still need to always write the pid file to the existing default path |
Ensure the PID is written to the runtime-provided --pid-file after container creation. This allows supervisors like conmon to track and reap the container process correctly, preventing early cleanup or EOF failures. This change also ensures that Podman can reliably start urunc containers.
Description
In the current code, there is a --pid-file flag, but in reality, we are not actually writing to the specified pid-file. This causes issues when starting urunc with Podman, preventing it from starting properly.
Related issues
#114
How was this tested?
I tested using the method described in Check integration of urunc with podman #114 and configured Podman to use urunc as the runtime. I executed the following command to modify the Podman container configuration:
To ensure urunc can locate the QEMU binary, the QEMU path needs to be set in the config.toml file for urunc. The configuration should look like this:
Run urunc with Podman
After configuring the runtime and QEMU path, I attempted to run the urunc container using Podman:
result:

LLM usage
Using Codex to debug the cause of the issue#114
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).