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

Consul Connect: Fix validation with multiple local_bind_socket_paths #22312

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

sundbry
Copy link
Contributor

@sundbry sundbry commented May 24, 2024

When a consul connect sidecar service is defined with multiple local_bind_socket_path upstreams, validation fails due to duplicate socket address bindings on :0 being detected:

Error submitting job: Unexpected response code: 500 (1 error occurred:
        * Consul Connect services "caddy-https" and "caddy-https" in group "caddy" using same address for upstreams (:0))

This patch validates local_bind_socket_path upstreams separately from local_bind_address sockets.

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Hi @sundbry! Thanks for this fix. I've left a comment about reusing the map. Also:

  • You'll want to gofmt -s the file when you're done to make the lint check happy
  • Can you run make cl to create a changelog entry?

nomad/job_endpoint_hook_connect.go Outdated Show resolved Hide resolved
@sundbry
Copy link
Contributor Author

sundbry commented Jun 3, 2024

Hi @tgross, thanks for the review - I have resubmitted it after changes + added a changelog entry.

sundbry added 2 commits June 3, 2024 08:49
When a consul connect sidecar service is defined with multiple
local_bind_socket_path upstreams, validation would fail due to duplicate
socket address bindings on `:0` being detected.

Validate local_bind_socket_path sockets separately from IP address
sockets.
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @sundbry!

@tgross tgross added theme/consul/connect Consul Connect integration backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/ent/1.6.x+ent Changes are backported to 1.6.x+ent backport/1.8.x backport to 1.8.x release line type/bug labels Jun 4, 2024
@tgross tgross merged commit 096c72a into hashicorp:main Jun 4, 2024
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.6.x+ent Changes are backported to 1.6.x+ent backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.8.x backport to 1.8.x release line theme/consul/connect Consul Connect integration type/bug
Projects
Development

Successfully merging this pull request may close these issues.

2 participants