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

deploy breaks with sudo-rs #224

Open
ezrizhu opened this issue Sep 27, 2024 · 1 comment
Open

deploy breaks with sudo-rs #224

ezrizhu opened this issue Sep 27, 2024 · 1 comment

Comments

@ezrizhu
Copy link

ezrizhu commented Sep 27, 2024

On systems with sudo-rs, when doing morph deploy x, it will fail and return

Executing 'switch' on matched hosts:

** stella
invalid option provided
usage: sudo -h | -K | -k | -V
usage: sudo -v [-knS] [-g group] [-u user]
usage: sudo -l [-knS] [-g group] [-U user] [-u user] [command [arg ...]]
usage: sudo [-knS] [-D directory] [-g group] [-u user] [-i | -s] [command [arg ...]]
usage: sudo -e [-knS] [-D directory] [-g group] [-u user] file ...
exit status 1

Caused by the -p '' sudo arg to disable prompt

cmdArgs = append(cmdArgs, "-p", "''", "-k", "--")

However, that is not implemented in sudo-rs trifectatechfoundation/sudo-rs#842

Workaround: remove sudo-rs from config, build&push, then manually ssh to machine, /nix/store/path-to-new-nixos-system/bin/switch-to-configuration

Related: #218

Feel free to close this as out of scope, but I thought I'd make an issue anyways in case other people are trying to debug why their deploys are failing when using sudo-rs

@cafkafk
Copy link
Member

cafkafk commented Sep 29, 2024

Feel free to close this as out of scope, but I thought I'd make an issue anyways in case other people are trying to debug why their deploys are failing when using sudo-rs

Thanks for making us aware. Currently, none of us are using sudo-rs, so we likely won't work on fixing this soon, and to some extend, this does seem like a "sudo compliance" issue on the sudo-rs side.

That said, this seems to be just an aesthetic choice, perhaps if someone wants to add a non-defaulting flag that disables this argument in a way that isn't overly invasive to the rest of the codebase, we'd accept such a PR.

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