Description
Describe the bug
jailer
(v1.10.1) fail to run with flag --daemonize
, and could run without flag --daemonize
.
To Reproduce
- Built
jailer
binary from tagv1.10.1
. - Run following command:
/root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/jailer \
--exec-file /root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/firecracker \
--id "test-instance" \
--gid 100 \
--uid 123 \
--daemonize
- The process exits immediately.
- Run following command (without
--daemonize
this time)
/root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/jailer \
--exec-file /root/firecracker_src/build/cargo_target/x86_64-unknown-linux-musl/debug/firecracker \
--id "test-instance" \
--gid 100 \
--uid 123
- The console hang with
[test-instance:main] Running Firecracker v1.10.1
which meansjailer
is running well. - Open another console, run
tree /srv/jailer/firecracker/test-instance/
and could see output like this:
/srv/jailer/firecracker/test-instance/
└── root
├── dev
│ ├── kvm
│ ├── net
│ │ └── tun
│ ├── urandom
│ └── userfaultfd
├── firecracker
├── firecracker.pid
└── run
└── firecracker.socket
There's a firecracker.socket
which means it's running well too.
Expected behaviour
When running jailer
with --daemonize
, the process could be started and expose the API socket for communication.
Environment
- Firecracker version: v.1.10.1
- Host and guest kernel versions: Host kernel
6.8.0-51-generic
; Guest kernel not used (bare jailer process). - Rootfs used: Not used (bare jailer process).
- Architecture: x86_64 (x86_64 x86_64 x86_64 GNU/Linux)
Additional context
[Author TODO: How has this bug affected you?]
I am developing a firecracker SDK in Rust, this bug prevents me to test functionality with daemonized instances.
[Author TODO: What are you trying to achieve?]
Start the daemonized jailer and communicate with it via API socket.
[Author TODO: Do you have any idea of what the solution might be?]
I repeated exactly the same on firecracker / jailer v1.7.0. And it succeeds with a running daemonized firecracker and a API socket exposed.
PR #4259 (Commit da92bf6) seemed to have changed the behavior of daemonization.
Checks
- [y] Have you searched the Firecracker Issues database for similar problems?
- [y] Have you read the existing relevant Firecracker documentation?
- [y] Are you certain the bug being reported is a Firecracker issue?