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(xds): don't read metadata in ProxyBuilders #5414

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

lahabana
Copy link
Contributor

@lahabana lahabana commented Dec 2, 2022

We were using a DataplaneMetadataTracker in all proxy builders. This was causing issues as the proxy may disconnect while reconciliation is in progress.

We now set the proxy metadata in the DataplaneWatchdog so that it's read once only and nil checked. We therefore protect ourselves against this race

Signed-off-by: Charly Molter charly.molter@konghq.com

Checklist prior to review

  • Link to docs PR or issue --
  • Link to UI issue or PR --
  • Is the issue worked on linked? --
  • The PR does not hardcode values that might break projects that depend on kuma (e.g. "kumahq" as a image registry) --
  • The PR will work for both Linux and Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Unit Tests --
  • E2E Tests --
  • Manual Universal Tests --
  • Manual Kubernetes Tests --
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? --
  • Do you need to explicitly set a > Changelog: entry here or add a ci/ label to run fewer/more tests?

We were using a `DataplaneMetadataTracker` in all proxy builders.
This was causing issues as the proxy may disconnect while reconciliation is in progress.

We now set the proxy metadata in the DataplaneWatchdog so that it's read once only and nil checked.
We therefore protect ourselves against this race

Signed-off-by: Charly Molter <charly.molter@konghq.com>
@lahabana lahabana requested a review from a team as a code owner December 2, 2022 15:16
Copy link
Contributor

@lobkovilya lobkovilya left a comment

Choose a reason for hiding this comment

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

LGTM!

@lahabana
Copy link
Contributor Author

lahabana commented Dec 2, 2022

@Mergifyio backport release-2.0

@mergify
Copy link
Contributor

mergify bot commented Dec 2, 2022

backport release-2.0

✅ Backports have been created

@lahabana lahabana enabled auto-merge (squash) December 2, 2022 15:38
@lahabana lahabana merged commit 39ba902 into kumahq:master Dec 2, 2022
mergify bot pushed a commit that referenced this pull request Dec 2, 2022
We were using a `DataplaneMetadataTracker` in all proxy builders.
This was causing issues as the proxy may disconnect while reconciliation is in progress.

We now set the proxy metadata in the DataplaneWatchdog so that it's read once only and nil checked.
We therefore protect ourselves against this race

Signed-off-by: Charly Molter <charly.molter@konghq.com>
(cherry picked from commit 39ba902)

# Conflicts:
#	pkg/api-server/inspect_endpoints.go
#	pkg/xds/sync/components.go
#	pkg/xds/sync/egress_proxy_builder.go
#	pkg/xds/sync/ingress_proxy_builder.go
lahabana pushed a commit that referenced this pull request Dec 2, 2022
We were using a `DataplaneMetadataTracker` in all proxy builders.
This was causing issues as the proxy may disconnect while reconciliation is in progress.

We now set the proxy metadata in the DataplaneWatchdog so that it's read once only and nil checked.
We therefore protect ourselves against this race

Signed-off-by: Charly Molter <charly.molter@konghq.com>
(cherry picked from commit 39ba902)

Signed-off-by: Charly Molter <charly.molter@konghq.com>
@lahabana lahabana mentioned this pull request Dec 13, 2022
@lahabana lahabana deleted the fixMetadata branch March 29, 2024 12:45
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