Skip to content

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/2.0.x#1071

Merged
hc-github-team-consul-core merged 1 commit into
release/2.0.xfrom
backport/spulluri/fixing_bugs_dp/recently-hot-pigeon
Apr 29, 2026
Merged

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/2.0.x#1071
hc-github-team-consul-core merged 1 commit into
release/2.0.xfrom
backport/spulluri/fixing_bugs_dp/recently-hot-pigeon

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #1066 to be assessed for backporting due to the inclusion of the label backport/2.0.

The below text is copied from the body of the original PR.


Description

Follow-up to #1064.

This updates the remaining Envoy admin URLs in pkg/envoy/proxy.go to use net.JoinHostPort instead of manually formatting host:port pairs.

The previous fmt.Sprintf("http://%s:%v/...") pattern is not safe for all admin bind addresses, especially IPv6 addresses. Drain() and Quit() were already updated to use net.JoinHostPort; this change applies the same fix to:

  • DumpConfig() via /config_dump?include_eds
  • Ready() via /ready

This keeps Envoy admin endpoint construction consistent across the proxy manager and avoids malformed URLs when the admin address is not a simple IPv4/hostname value.

Testing

  • Ran pkg/envoy/proxy_test.go

Overview of commits

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@hc-github-team-consul-core hc-github-team-consul-core merged commit bb2688b into release/2.0.x Apr 29, 2026
38 checks passed
panman90 added a commit that referenced this pull request Apr 29, 2026
* Backport of fix: prevent graceful shutdown errors from killing Envoy proxy immediately into release/2.0.x (#1075)

backport of commit 03475d3

Co-authored-by: santoshpulluri <santosh.pulluri@hashicorp.com>

* Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/2.0.x (#1071)

backport of commit fa7de22

Co-authored-by: santoshpulluri <santosh.pulluri@hashicorp.com>

---------

Co-authored-by: hc-github-team-consul-core <github-team-consul-core@hashicorp.com>
Co-authored-by: santoshpulluri <santosh.pulluri@hashicorp.com>
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.

3 participants