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

read-only telepresence version #3193

Open
nicks opened this issue May 22, 2023 · 3 comments
Open

read-only telepresence version #3193

nicks opened this issue May 22, 2023 · 3 comments
Labels
t:bug Something isn't working

Comments

@nicks
Copy link
Contributor

nicks commented May 22, 2023

Please describe your use case / problem.
I have a health-checking script that reports if a user has the right version of telepresence installed.

Currently, if you run telepresence version when no daemons are running locally, telepresence tries to automatically start the daemon with sudo. The user gets prompted for sudo.

This is confusing to a user who doesn't expect a version-checking script to start background daemons or require admin access.

$ telepresence version
An update of telepresence from version 2.13.1 to 2.13.2 is available. Please visit https://www.getambassador.io/docs/telepresence/latest/install/upgrade/ for more info.
Launching Telepresence Root Daemon
Need root privileges to run: /usr/local/bin/telepresence daemon-foreground /home/nick/.cache/telepresence/logs /home/nick/.config/telepresence

Describe the solution you'd like
Ideally, the default behavior of telepresence version wouldn't start up any new processes.

Describe alternatives you've considered
Alternatively, I'd be fine with telepresence version --read-only that worked this way.

Versions (please complete the following information)

Client         : v2.13.1
Root Daemon    : v2.13.1
User Daemon    : v2.13.1
Traffic Manager: not connected

Additional context
I have the same complaint about telepresence status

@cindymullins-dw
Copy link
Collaborator

Hi @nicks, the output we get is different, as below.
An update of telepresence from version 2.13.1 to 2.13.3 is available. Please visit https://www.getambassador.io/docs/telepresence/latest/install/upgrade/ for more info.
Client : v2.13.1
Root Daemon: not running
User Daemon: not running

Maybe the session was not quit and Telepresence took that command as a prompt to re-engage. Could you try running telepresence quit -s. That will stop it completely.

Telepresence status works the same way by the way.

@nicks
Copy link
Contributor Author

nicks commented Jun 5, 2023

Hi @cindymullins-dw ! Ah, I think I just realized what causes it. Try these repro steps:

telepresence quit -s
telepresence helm upgrade
telepresence version

My theory of what's happening is that telepresence gets into a weird state where the User Daemon is running but the Root Daemon is not, so telepresence version tries to start the root daemon.

@cindymullins-dw cindymullins-dw added the t:bug Something isn't working label Jun 12, 2023
@cindymullins-dw
Copy link
Collaborator

Thanks, @nicks, not sure this is truly a bug but could probably be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants