Skip to content

deploy breaks with sudo-rs #224

@ezrizhu

Description

@ezrizhu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions