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(mads): add mutex when checking if reconcile is needed and reconciling #11578

Merged
merged 5 commits into from
Sep 26, 2024

Conversation

lobkovilya
Copy link
Contributor

This is a straightforward fix for the MADS problem we see in unit tests. But we probably don't need NeedsReconciliation at all since we fixed watchdogs to reconcile before the first tick #11105

CC @Automaat @michaelbeaumont

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

@lobkovilya lobkovilya requested a review from a team as a code owner September 26, 2024 11:44
@lobkovilya lobkovilya requested review from slonka and jakubdyszkiewicz and removed request for a team September 26, 2024 11:44
@Automaat
Copy link
Contributor

But we probably don't need NeedsReconciliation at all

I am not sure about this, MADS works in a weird way since it is responding to http requests not relying entirely on watchdogs.

Copy link
Contributor

@lahabana lahabana left a comment

Choose a reason for hiding this comment

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

This is simple fix. The more complex fix is trickier because of these reconcilers running concurrently makes 0 sense. So this will work for now

@Icarus9913
Copy link
Contributor

Icarus9913 commented Sep 26, 2024

I am not sure about this, MADS works in a weird way since it is responding to http requests not relying entirely on watchdogs.

In my opinion the watchdog runs in goroutine and we need every interval to generate the XDS. And each http request gets response from go-control-plane fetch method.

Although we got that first tick reconcile from #11105, but you can imagine that the request happens between the first and second tick to fetch xds configurations then it would not found something new. That's why there's a restCallback function in MADS.

@lobkovilya lobkovilya enabled auto-merge (squash) September 26, 2024 13:36
@lobkovilya lobkovilya merged commit 1b9d966 into kumahq:master Sep 26, 2024
13 checks passed
@lobkovilya lobkovilya deleted the fix/mads-flakes branch September 26, 2024 15:36
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.

5 participants