tiup should not require sudo / su
Bug Report
Please answer these questions before submitting your issue. Thanks!
-
What did you do? tiup cluster check ./topology.yaml
-
What did you expect to see? Command succeeds
-
What did you see instead? tiup is checking updates for component cluster ... Starting component
cluster: /home/tiup/.tiup/components/cluster/v1.11.2/tiup-cluster check ./topology.yaml
- Download necessary tools
- Downloading check tools for linux/amd64 ... Done
- Collect basic system information
- Getting system info of 127.0.0.1:22 ... Error
Error: executor.ssh.execute_failed: Failed to execute command over SSH for '[email protected]:22' {ssh_stderr: We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things: #1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility. sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin /usr/bin/sudo -H bash -c "test -d /tmp || (mkdir -p /tmp && chown tiup:$(id -g -n tiup) /tmp)"}, cause: Process exited with status 1
- What version of TiUP are you using (
tiup --version)? 1.11.1 tiup Go Version: go1.19.2 Git Ref: v1.11.1 GitHash: b95172df211e4f9b643590f2dd8436ad60c72b38
Note:
- systemd supports user services
- Many organisations will not approve the use of "sudo" in a production environment. I've already encountered some during POCs ( as a TSA ), and seen yet more people discuss this in lark
RHEL7 do not support systemd user services, maybe we could a option to use it