erikarvstedt / extra-container

Run declarative NixOS containers without full system rebuilds
MIT License
218 stars 16 forks source link

Restart hangs when there is root-login session #3

Closed danbst closed 6 years ago

danbst commented 6 years ago

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

erikarvstedt commented 6 years ago

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