Skip to content

0.15.0 is broken on self-hosted runners - no systemd #95

@jimmidyson

Description

@jimmidyson

0.15.0 uses the new experimental installer and forces nix installer init to systemd (see https://github.com/jetify-com/devbox-install-action/blob/v0.15.0/action.yml#L155). This works fine in public runners.

However, on self-hosted runners that run in pods, there is no systemd so nix daemon fails to start and is unavailable. With DeterminateSystems/nix-installer-action nix installation works with log line Directly spawning the daemon, since systemd is not available so worked around this bug by using the DeterminateSystems action for nix install. Would rather not have to do that though...

Relevant logs from the failed run:

INFO nix_installer::self_test: Running self test for shell bash
    at src/self_test.rs:64

WARN nix_installer::plan: SelfTest([ShellFailed { shell: Sh, command: "\"sh\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook \\'\\' --no-link --expr \\'derivation { name = \\\"self-test-sh-1774472418035\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }\\'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n       … while calling the 'derivationStrict' builtin\n         at «nix-internal»/derivation-internal.nix:37:12:\n           36|\n           37|   strict = derivationStrict drvAttrs;\n             |            ^\n           38|\n\n       … while evaluating derivation 'self-test-sh-1774472418035'\n         whose name attribute is located at «string»:1:14\n\n       error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': No such file or directory\n" } }, ShellFailed { shell: Bash, command: "\"bash\" \"-lc\" \"exec nix build --option substitute false --option post-build-hook \\'\\' --no-link --expr \\'derivation { name = \\\"self-test-bash-1774472418135\\\"; system = \\\"x86_64-linux\\\"; builder = \\\"/bin/sh\\\"; args = [\\\"-c\\\" \\\"echo hello > \\\\$out\\\"]; }\\'\"", output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "error:\n       … while calling the 'derivationStrict' builtin\n         at «nix-internal»/derivation-internal.nix:37:12:\n           36|\n           37|   strict = derivationStrict drvAttrs;\n             |            ^\n           38|\n\n       … while evaluating derivation 'self-test-bash-1774472418135'\n         whose name attribute is located at «string»:1:14\n\n       error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': No such file or directory\n" } }])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions