Show a warning in tsh when connecting to a too old cluster#43461
Merged
Show a warning in tsh when connecting to a too old cluster#43461
Conversation
rosstimothy
reviewed
Jun 25, 2024
| // Verify server->client and client->server compatibility. | ||
| if tc.CheckVersions { | ||
| if !utils.MeetsVersion(teleport.Version, pr.MinClientVersion) { | ||
| if !utils.MeetsMinVersion(teleport.Version, pr.MinClientVersion) { |
Contributor
There was a problem hiding this comment.
I don't know that the minimum version check will even work with a cluster >=v16.0.0 now that unsupported client connections are terminated by Auth. In my testing I'm seeing an EOF error during login prior to getting into this check.
Contributor
Author
There was a problem hiding this comment.
Hmm, it's because webclient.Ping above returns an empty pr.MinClientVersion string (so utils.MeetsVersion returns true). Do you maybe know why it happens?
rosstimothy
approved these changes
Jun 25, 2024
Collaborator
|
Does the skip version flag actually work with tsh? |
Contributor
Author
Yeah, passing |
avatus
approved these changes
Jul 1, 2024
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 12, 2024
* `MeetsVersion` -> `MeetsMinVersion` * Add `MeetsMaxVersion` * Show a warning if tsh version is newer than server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per our compatibility promise, we don't support clients newer than servers. Unfortunately, we don't show any warning about it, so tsh may suddenly fail (like here https://gravitational.slack.com/archives/C01TYKHFVTQ/p1718877334960729).
The only warning we have is about too old clients.
The new warning looks as below:
changelog: tsh now shows a warning when connecting to a cluster on an older major version. More on client compatibility https://goteleport.com/docs/upgrading/overview/#component-compatibility