erikarvstedt / extra-container

Run declarative NixOS containers without full system rebuilds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restart hangs when there is root-login session

danbst opened this issue · comments

When I have a nixos-container root-login ... session to container, and launch extra-container restart ..., it restarts, but has 120 sec timeout. Looks like systemd can't stop container completely, so it kills it on timeout.

But if I interrupt extra-container in the middle of waiting, subsequent extra-container restart does nothing. But the result is that container is stopped (by systemd timeout) and not started afterwards.

This is a bit annoying

This bug is out of scope for extra-container, it has to be addressed in NixOS or maybe in systemd.

The delay even appears when using machinectl terminate :

nixos-container start mycontainer
nixos-container root-login mycontainer # run in another shell
machinectl terminate mycontainer
# machinectl finishes successfully, but the machine is still running