tiup should not require sudo / su
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
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 componentcluster: /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 'tiup@127.0.0.1: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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tiup cluster check ./topology.yaml entry point and trace the SSH execution that runs /usr/bin/sudo. Review the reported executor.ssh.execute_failed path and determine the intended behavior when sudo requires a password; done means the check succeeds without requiring an interactive sudo prompt, with coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100