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

add nil check when reading endpoint hostname #12689

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

adleong
Copy link
Member

@adleong adleong commented Jun 6, 2024

Fixes #12686

When an endpoint in an EndpointSlice resource does not contain a hostname field, the destination controller can panic while looking for an endpoint with a certain hostname. This happens when doing a lookup with a pod dns name.

We add a nil check to avoid the panic.

We add such an endpoint to our test fixture to exercise this case.

Signed-off-by: Alex Leong <alex@buoyant.io>
@adleong adleong requested a review from a team as a code owner June 6, 2024 22:43
@acallejaszu
Copy link

Thanks for the quick response on this! It would be nice to see a mention as this is the fix I proposed in the issue, but :man-shrugging:

@adleong
Copy link
Member Author

adleong commented Jun 7, 2024

@acallejaszu Yes, absolutely! Thank you so much for finding, root causing, and solving this bug. I do want to make sure that you're properly credited. What did you have in mind?

@acallejaszu
Copy link

Hey @adleong thanks for your response! Just a mention in the release description/changelog where you will include this bug fix will be more than enough. Thanks!

@adleong adleong merged commit 3bd01ca into main Jun 10, 2024
38 checks passed
@adleong adleong deleted the alex/nil-hostname branch June 10, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Destination container in the linkerd-destination pod panics when using deployments with headless services
4 participants