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

Fix a bug that wrongly trims domains when there is an overlap with DC name 1.15.x #18163

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

dhiaayachi
Copy link
Contributor

This is a backport of #17160

… name (#17160)

* Fix a bug that wrongly trims domains when there is an overlap with DC name

Before this change, when DC name and domain/alt-domain overlap, the domain name incorrectly trimmed from the query.

Example:

Given: datacenter = dc-test, alt-domain = test.consul.
Querying for "test-node.node.dc-test.consul" will faile, because the
code was trimming "test.consul" instead of just ".consul"

This change, fixes the issue by adding dot (.) before trimming

* trimDomain: ensure domain trimmed without modyfing original domains

* update changelog

---------

Co-authored-by: Dhia Ayachi <dhia@hashicorp.com>
@dhiaayachi dhiaayachi added pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport labels Jul 17, 2023
@dhiaayachi dhiaayachi merged commit c940dac into release/1.15.x Jul 18, 2023
119 of 120 checks passed
@dhiaayachi dhiaayachi deleted the trim_domains_1.15.x branch July 18, 2023 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants