NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.82k stars 363 forks source link

error message: unable to activate new configuration (exit code 4) #950

Open coretemp opened 6 years ago

coretemp commented 6 years ago

This error message could use improvement:

error: Traceback (most recent call last):
  File "/nix/store/y1yzy2zvs9cwina4jpj538x9cisn7g1g-nixops-1.6.1pre0_abcdef/lib/python2.7/site-packages/nixops/deployment.py", line 731, in worker
    raise Exception("unable to activate new configuration (exit code {})".format(res))
Exception: unable to activate new configuration (exit code 4)

Running nixops deploy multiple times resolves the problem, so it's likely related to memory usage.

AmineChikhaoui commented 6 years ago

exit 4 is returned from switch-to-configuration script when one of the systemd units fails during the config switch, you should be able to check that in the journal of the target machine.

PAI5REECHO commented 2 years ago

Would be very nice if nixops gave feedback about the unit/service failure (show the journal log pertaining to the service)