lib/teleterm: Remove misleading error log after LocalAgent.GetKey#28662
Merged
lib/teleterm: Remove misleading error log after LocalAgent.GetKey#28662
Conversation
espadolini
approved these changes
Jul 5, 2023
smallinsky
approved these changes
Jul 5, 2023
Member
Author
|
Thanks for quick reviews! |
|
@ravicious See the table below for backport results.
|
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.
When you first login to a cluster in Connect and provide the cluster address, Connect creates a profile file for the cluster in Connect's tsh home. Naturally, at this point there's no keys for the cluster. So when you then submit your login credentials and we call
clusters.Storage.fromProfile,LocalAgent.GetKeyreturns a not found error.In that case we should just continue, similar to how other places in tsh do this:
teleport/tool/tsh/common/kube.go
Lines 142 to 146 in 2cba82c
Instead, the previous version would log the error as if something bad has happened:
Error log
This was spammed frequently enough in the logs that was plain confusing for users submitting logs for troubleshooting – I've seen at least two instances of that.
This PR makes it so that we just log the fact that the keys were not found, without including the error.