Skip to content

Commit

Permalink
Start multi-user.target on deploy. Fixes NixOS#1063.
Browse files Browse the repository at this point in the history
This makes `nixops deploy` congruent (the declared services
will always be running after deploy, no matter what the state
of the server was before the deploy).
  • Loading branch information
nh2 committed Jun 20, 2020
1 parent 188c312 commit e72a6b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nixops/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,11 @@ def worker(m):
# FIXME: should check which systemd services
# failed to start after the reboot.

if res == 0:
res = m.run_command("systemctl isolate multi-user.target")
if res != 0:
raise Exception("unable to start multi-user.target")

if res == 0:
m.success("activation finished successfully")

Expand Down

0 comments on commit e72a6b3

Please sign in to comment.