Skip to content

Backport of Avoid panic applying TProxy Envoy extensions into release/1.15.x#17542

Closed
hc-github-team-consul-core wants to merge 1 commit intorelease/1.15.xfrom
backport/zalimeni/net-3900-fix-tproxy-extension-panic/slowly-blessed-moray
Closed

Backport of Avoid panic applying TProxy Envoy extensions into release/1.15.x#17542
hc-github-team-consul-core wants to merge 1 commit intorelease/1.15.xfrom
backport/zalimeni/net-3900-fix-tproxy-extension-panic/slowly-blessed-moray

Conversation

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

Backport

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

🚨

Warning automatic cherry-pick of commits failed. If the first commit failed,
you will see a blank no-op commit below. If at least one commit succeeded, you
will see the cherry-picked commits up to, not including, the commit where
the merge conflict occurred.

The person who merged in the original PR is:
@zalimeni
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.

merge conflict error: POST https://api.github.com/repos/hashicorp/consul/merges: 409 Merge conflict []

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


When UpstreamEnvoyExtender was introduced, some code was left duplicated between it and BasicEnvoyExtender. One path in that code panics when a TProxy listener patch is attempted due to no upstream data in RuntimeConfig matching the local service (which would only happen in rare cases).

Instead, we can remove the special handling of upstream VIPs from BasicEnvoyExtender entirely, greatly simplifying the listener filter patch code and avoiding the panic. UpstreamEnvoyExtender, which needs this code to function, is modified to ensure a panic does not occur.

This also fixes a second regression in which the Lua extension was not applied to TProxy outbound listeners.

Description

This fixes two regressions caused by #17415.

Testing & Reproduction steps

I've hand-tested this fix in addition to adding tests to guard against the regressions.

PR Checklist

  • updated test coverage
  • external facing docs updated - N/A
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/zalimeni/net-3900-fix-tproxy-extension-panic/slowly-blessed-moray branch from 7d94518 to f566a8e Compare June 1, 2023 17:04
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/zalimeni/net-3900-fix-tproxy-extension-panic/slowly-blessed-moray branch from f566a8e to 7d94518 Compare June 1, 2023 17:04
@hashicorp-cla
Copy link

hashicorp-cla commented Jun 1, 2023

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes


temp seems not to be a GitHub user.
You need a GitHub account to be able to sign the CLA.
If you have already a GitHub account, please add the email address used for this commit to your account.

Have you signed the CLA already but the status is still pending? Recheck it.

Copy link
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

@zalimeni zalimeni closed this Jun 1, 2023
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging June 1, 2023 17:08 Inactive
@vercel vercel bot temporarily deployed to Preview – consul June 1, 2023 17:10 Inactive
@github-actions github-actions bot deleted the backport/zalimeni/net-3900-fix-tproxy-extension-panic/slowly-blessed-moray branch August 29, 2025 06:26
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.

4 participants