You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inactive services that are wanted by the multi-user.target are started on switch-to-configuration.pl: See https://nixos.org/manual/nixos/stable/#sec-unit-handling (multi-user.target gets started on a switch which starts up inactive units).
The reason why I'm bringing this up is a practical one: in some cases you want to deploy services without starting them (which is effectively forced by the current implementation).
An example is a bunch of queue consumers that must not be started before a certain component is finished. What I tried was to temporarily mask the services during a deployment, however then systemctl is-active returns false causing the component to attempt starting up the unit which fails because the unit got masked before.
To be precise, I'm talking about the following code-snippet:
https://github.com/flyingcircusio/batou_ext/blob/2.4.2/src/batou_ext/nix.py#L298-L305
I'm not sure if this is actually needed:
wantedBy = [ "multi-user.target" ];
:https://github.com/flyingcircusio/fc-nixos/blob/11b6b49aaaa04145496a208cf23d1d7515dab0b2/nixos/platform/systemd.nix#L74-L78
inactive services that are wanted by the
multi-user.target
are started onswitch-to-configuration.pl
: See https://nixos.org/manual/nixos/stable/#sec-unit-handling (multi-user.target
gets started on a switch which starts up inactive units).a rebuild causing a switch is done on the nixos platform implementation: https://github.com/flyingcircusio/batou_ext/blob/2.4.2/src/batou_ext/nix.py#L290
The reason why I'm bringing this up is a practical one: in some cases you want to deploy services without starting them (which is effectively forced by the current implementation).
An example is a bunch of queue consumers that must not be started before a certain component is finished. What I tried was to temporarily mask the services during a deployment, however then
systemctl is-active
returnsfalse
causing the component to attempt starting up the unit which fails because the unit got masked before.For context, see also FC-31563.
cc @zagy
The text was updated successfully, but these errors were encountered: