!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

322 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena109 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
1 Dec 2022
@zhaofeng:zhaofeng.liZhaofeng Li Interesting, and it says something like sudo: command not found? 19:12:38
@zhaofeng:zhaofeng.liZhaofeng Li Just confirming, is the deployment.privilegeEscalationCommand set inside the host config? If it's outside, you may have inadvertently created a deployment node instead 19:14:14
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @linus:schreibt.jetzt
also, the heuristic results in 52 workers for me which... I think is deep into inappropriate territory for 32G of RAM :D
Well yeah, currently it assumes each node takes 512MB to evaluate 😅 Or (remaining_ram - 1024MB) / 512MB nodes
19:16:48
@ask-yourself:matrix.org@ask-yourself:matrix.org
In reply to @zhaofeng:zhaofeng.li
Interesting, and it says something like sudo: command not found?

This is the output for both commands:

.dotfiles on  main [!+] λ colmena apply-local --sudo
thread 'main' panicked at 'Failed to run sudo to escalate privileges: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/command/apply_local.rs:162:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

.dotfiles on  main [!+] ⊥ colmena apply-local
[WARN ] Colmena was not started by root. This is probably not going to work.
[WARN ] Hint: Add the --sudo flag.
warning: Git tree '/home/isaac/.dotfiles' is dirty
[INFO ] Using flake: git+file:///home/isaac/.dotfiles
warning: Git tree '/home/isaac/.dotfiles' is dirty
warning: Git tree '/home/isaac/.dotfiles' is dirty
        🕔 7s 2 succeeded
desktop ✅ 6s Evaluated desktop
        ❌ 7s Failed: Child process exited with error code: 1
desktop ✅ 6s Evaluated desktop
desktop ✅ 0s Built "/nix/store/pm7h842lz8c1jwx3crwj1hmwxn9hphr5-nixos-system-desktop-23.05pre-git"
desktop ✅ 0s Pushed system closure
desktop ❌ 0s Activation failed: Child process exited with error code: 1
[ERROR] Failed to deploy to desktop - Last 3 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
19:23:20
@ask-yourself:matrix.org@ask-yourself:matrix.org
In reply to @zhaofeng:zhaofeng.li
Just confirming, is the deployment.privilegeEscalationCommand set inside the host config? If it's outside, you may have inadvertently created a deployment node instead
I think so, if you wanna see where I've set it up in full context, it's here: https://gitlab.com/IsaacBrown92/dotfiles/-/blob/main/nixos/desktop/security.nix
19:27:30
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @ask-yourself:matrix.org

This is the output for both commands:

.dotfiles on  main [!+] λ colmena apply-local --sudo
thread 'main' panicked at 'Failed to run sudo to escalate privileges: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/command/apply_local.rs:162:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

.dotfiles on  main [!+] ⊥ colmena apply-local
[WARN ] Colmena was not started by root. This is probably not going to work.
[WARN ] Hint: Add the --sudo flag.
warning: Git tree '/home/isaac/.dotfiles' is dirty
[INFO ] Using flake: git+file:///home/isaac/.dotfiles
warning: Git tree '/home/isaac/.dotfiles' is dirty
warning: Git tree '/home/isaac/.dotfiles' is dirty
        🕔 7s 2 succeeded
desktop ✅ 6s Evaluated desktop
        ❌ 7s Failed: Child process exited with error code: 1
desktop ✅ 6s Evaluated desktop
desktop ✅ 0s Built "/nix/store/pm7h842lz8c1jwx3crwj1hmwxn9hphr5-nixos-system-desktop-23.05pre-git"
desktop ✅ 0s Pushed system closure
desktop ❌ 0s Activation failed: Child process exited with error code: 1
[ERROR] Failed to deploy to desktop - Last 3 lines of logs:
[ERROR]  created)
[ERROR]    state) Running
[ERROR]  failure) Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR]  failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Aha, you are using 0.3. Then you need --sudo-command=doas instead of deployment.privilegeEscalationCommand. 0.3 escalates privileges in apply-local eagerly at the beginning before evaluation.
19:43:42
@zhaofeng:zhaofeng.liZhaofeng LiIn the main development branch, it was changed to only escalate during activation using the configured privilege escalation command. 19:44:22
@ask-yourself:matrix.org@ask-yourself:matrix.orgOh, how can I be on the current version? 19:47:49
@zhaofeng:zhaofeng.liZhaofeng LiYou can use the flake of the unreleased version as mentioned here: https://colmena.cli.rs/unstable/tutorial/flakes.html19:49:03
@ask-yourself:matrix.org@ask-yourself:matrix.org Oh, so deployment.privilegeEscalationCommand is an unreleased feature? 19:52:08
@zhaofeng:zhaofeng.liZhaofeng Li It's used for the normal apply but for apply-local it's unreleased 19:52:54
@ask-yourself:matrix.org@ask-yourself:matrix.orgAhhh.19:53:42
@ask-yourself:matrix.org@ask-yourself:matrix.orgOk I see.19:53:44
@ask-yourself:matrix.org@ask-yourself:matrix.orgThank you very much.19:53:47

Show newer messages


Back to Room ListRoom Version: 6