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

tsh in Connect terminal stops working after logging out of a cluster #48563

Open
ravicious opened this issue Nov 7, 2024 · 0 comments
Open
Labels
bug teleport-connect Issues related to Teleport Connect.

Comments

@ravicious
Copy link
Member

Not attaching this to the test plan since this probably never worked. It's present on v16.0.0 as well.

Repro:

  1. Connect to a cluster.
  2. Connect to another cluster and log out of it.
  3. Open a terminal tab in the first cluster and execute tsh status.

Both tsh and tctl think you're logged out because $TELEPORT_HOME/current-profile points at a profile that has been removed.

The notion of current profile as understood by tsh has been largely inconsequential in Connect. Switching a profile in the top right doesn't change the current profile in tsh. Perhaps it should, but there's the problem of functions such as lib/client.RetryWithRelogin changing the current profile as well (#25806 (comment), that's been the case in April 2024, idk if it's still true).

Perhaps Connect should sync its current profile with tsh's current profile, especially once we get around to #25806.

Until then, a good enough solution would be to pick the first cluster during the Logout RPC (or Remove Cluster RPC? We still haven't unified them) and set it as the current cluster, if any.

@ravicious ravicious added bug teleport-connect Issues related to Teleport Connect. labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug teleport-connect Issues related to Teleport Connect.
Projects
None yet
Development

No branches or pull requests

1 participant