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

colmena apply fails when invoked from systemd unit #192

Open
pkel opened this issue Jan 17, 2024 · 1 comment
Open

colmena apply fails when invoked from systemd unit #192

pkel opened this issue Jan 17, 2024 · 1 comment

Comments

@pkel
Copy link
Contributor

pkel commented Jan 17, 2024

I'm calling colmena apply from a systemd unit and observe the following error:

[INFO ] Using configuration: <redacted_path>/hive.nix
[INFO ] Enumerating nodes...
[ERROR] -----
[ERROR] Operation failed with error: I/O Error: No such file or directory (os error 2)

The systemd unit looks roughly like this:

 systemd.services.deploy-colmena-hive = {
    description = "deploy colmena hive";
    path = with pkgs; [ colmena ] ;
    script = ''
      <some other stuff>
      colmena apply switch
      <some other stuff>
    ''

The error does not appear after setting

systemd.services.deploy-colmena-hive.path = with pkgs; [ colmena nix ] ;

I'm not proficient with nixos, but shouldn't nix be registered as a dependency elsewhere?

@bjornfor
Copy link
Contributor

(I'm an end user.)

Perhaps. But Nix is a special dependency, I think it's fine to have colmena pick it up from PATH. If colmena were to "bundle" nix, I think it should only be a fallback, and still use the one in PATH (if exists).

However, the error message should definitely be fixed to include what file/directory was missing.

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

2 participants