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

Backport of consul/connect: fixed a bug where restarting proxy tasks failed. into release/1.3.x #16842

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

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

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


The first start of a Consul Connect proxy sidecar triggers a run of the envoy_version hook which modifies the task config image entry. The modification takes into account a number of factors to correctly populate this. Importantly, once the hook has run, it marks itself as done so the taskrunner will not execute it again.

When the client receives a non-destructive update for the allocation which the proxy sidecar is a member of, it will update and overwrite the task definition within the taskerunner. In doing so it overwrite the modification performed by the hook. If the allocation is restarted, the envoy_version hook will be skipped as it previously marked itself as done, and therefore the sidecar config image is incorrect and causes a driver error.

The fix removes the hook in marking itself as done to the view of the taskrunner, and instead tracks this internally. The hook also implements the TaskPreKillHook interface, so that it's state can be correctly modified when required by task events.

closes #9887

The linked issue has reproduction steps for testing.

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/b-gh-9887-envoy-proxy-restart-hook/secretly-engaging-badger branch 2 times, most recently from e275644 to bb40446 Compare April 11, 2023 14:56
@hc-github-team-nomad-core hc-github-team-nomad-core merged commit cfe1dad into release/1.3.x Apr 11, 2023
@hc-github-team-nomad-core hc-github-team-nomad-core deleted the backport/b-gh-9887-envoy-proxy-restart-hook/secretly-engaging-badger branch April 11, 2023 14:56
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.

None yet

2 participants