Skip to content

Commit 55a7f8b

Browse files
Sudan Landgewearyzen
authored andcommitted
changelog: update Jailer limitations and suggestions
There was a change in behaviour introduced in Jailer because of which killing the Jailer does not kill the Firecracker process. Highlight the change in behaviour and suggested workaround in the CHANGELOG and Jailer doc. Signed-off-by: Sudan Landge <[email protected]>
1 parent 1601959 commit 55a7f8b

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,19 @@ and this project adheres to
4646
This fixes a bug where a microVM with incompatible balloon and guest memory
4747
size could be booted, due to the check for this condition happening after
4848
Firecracker's configuration was updated.
49+
- [#4259](https://github.com/firecracker-microvm/firecracker/pull/4259): Added a
50+
double fork mechanism in the Jailer to avoid setsid() failures occurred while
51+
running Jailer as the process group leader. However, this changed the
52+
behaviour of Jailer and now the Firecracker process will always have a
53+
different PID than the Jailer process.
54+
[#4436](https://github.com/firecracker-microvm/firecracker/pull/4436): Added a
55+
"Known Limitations" section in the Jailer docs to highlight the above change
56+
in behaviour introduced in PR#4259.
57+
[#4442](https://github.com/firecracker-microvm/firecracker/pull/4442): As a
58+
solution to the change in behaviour introduced in PR#4259, provided a
59+
mechanism to reliably fetch Firecracker PID. With this change, Firecracker
60+
process's PID will always be available in the Jailer's root directory
61+
regardless of whether new_pid_ns was set.
4962

5063
## \[1.6.0\]
5164

docs/jailer.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,13 @@ Note: default value for `<api-sock>` is `/run/firecracker.socket`.
280280
### Known limitations
281281

282282
- When passing the --daemonize option to Firecracker without the --new-ns-pid
283-
option, the Firecracker process will have a different pid than the Jailer
284-
process. The suggested workaround to get Firecracker process's pid in this
285-
case is using `--new-pid-ns` flag and read Firecracker's pid from the
286-
`firecracker.pid` file present in the jailer's root directory.
283+
option, the Firecracker process will have a different PID than the Jailer
284+
process and killing the Jailer will not kill the Firecracker process. As a
285+
workaround to get Firecracker PID, the Jailer stores the PID of the child
286+
process in the jail root directory inside `<exec_file_name>.pid` for all cases
287+
regardless of whether `--new-pid-ns` was provided. The suggested way to fetch
288+
Firecracker's PID when using the Jailer is to read the `firecracker.pid` file
289+
present in the Jailer's root directory.
287290

288291
## Caveats
289292

0 commit comments

Comments
 (0)