Skip to content

Commit 39a0fae

Browse files
kalyazinpb8o
authored andcommitted
test(jailer): do not kill screen with new_pid_ns
In our setup, if Firecracker is run by the screen with --new-pid-ns passed to the jailer, the Firecracker process detaches from the screen causing the screen process to exit as well. We attempt to kill the screen process by pid, which causes a race condition. This change lets the screen terminate on its own without attempting to kill it. Signed-off-by: Nikita Kalyazin <[email protected]>
1 parent 850d5c5 commit 39a0fae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/framework/microvm.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,12 @@ def spawn(
632632
)
633633
self._screen_pid = screen_pid
634634

635+
# If `--new-pid-ns` is used, the Firecracker process will detach from
636+
# the screen and the screen process will exit. We do not want to
637+
# attempt to kill it in that case to avoid a race condition.
638+
if self.jailer.new_pid_ns:
639+
self._screen_pid = None
640+
635641
self._spawned = True
636642

637643
if emit_metrics:

0 commit comments

Comments
 (0)