Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting up services configured with batou.lib.service.Service via systemctl start may not be necessary on NixOS #143

Open
Ma27 opened this issue Dec 27, 2023 · 0 comments

Comments

@Ma27
Copy link
Member

Ma27 commented Dec 27, 2023

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:

  • each service generated like this has a wantedBy = [ "multi-user.target" ];:

https://github.com/flyingcircusio/fc-nixos/blob/11b6b49aaaa04145496a208cf23d1d7515dab0b2/nixos/platform/systemd.nix#L74-L78

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.

For context, see also FC-31563.

cc @zagy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant