Skip to content

Fix hostname resolution for connections in leaf clusters#38358

Merged
rosstimothy merged 1 commit intomasterfrom
tross/leaf_hostname
Feb 20, 2024
Merged

Fix hostname resolution for connections in leaf clusters#38358
rosstimothy merged 1 commit intomasterfrom
tross/leaf_hostname

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

The changes to hostname resolution introduced in #35773 were always using the root cache to lookup a matching node, which is never going to find a match if the target is in the leaf cluster. This is now resolved by using the services.NodeWatcher of the cluster that the target node is a member of.

Changelog: Fixes an issue that prevented the Web UI from properly displaying the hostname of servers in leaf clusters.

The changes to hostname resolution introduced in #35773 were always
using the root cache to lookup a matching node, which is never
going to find a match if the target is in the leaf cluster. This
is now resolved by using the `services.NodeWatcher` of the cluster
that the target node is a member of.
@rosstimothy rosstimothy marked this pull request as ready for review February 16, 2024 22:54
@github-actions github-actions Bot requested review from smallinsky and tcsc February 16, 2024 22:55
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but can we add a test since this was a regression?

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from tcsc February 19, 2024 09:11
@rosstimothy
Copy link
Copy Markdown
Contributor Author

Looks good but can we add a test since this was a regression?

I would very much like to add a test, however, the way "Teleport" is setup and created in the lib/web tests is not very conducive to trusted clusters at the moment. If it's alright I'd like to follow up with a PR that tidies up some of the test fixture setup to make it possible to add and use leaf clusters in the web tests.

@rosstimothy rosstimothy added this pull request to the merge queue Feb 20, 2024
Merged via the queue into master with commit e93208c Feb 20, 2024
@rosstimothy rosstimothy deleted the tross/leaf_hostname branch February 20, 2024 23:11
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rosstimothy See the table below for backport results.

Branch Result
branch/v15 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants