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(kuma-cp): cancel OnTick when watchdog stopped #7221

Merged
merged 5 commits into from
Jul 13, 2023

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Jul 11, 2023

If SimpleWatchdog.OnTick from the dataplaneWatchdogFactory, i.e. snapshot generation, takes a very long time and the proxy disconnects and reconnects, the Context used in OnTick is never canceled, because OnTick never returns and we thus never see stop being closed.

Additionally, we did not pass an OnTick Context down into the Generators, in particular, to generateCerts.

I intentionally don't touch hds, mads or kds with this PR.

  • noticed while testing locally but CP recovers: OnTick error: metadata cannot be nil?

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) --
  • 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?

@michaelbeaumont michaelbeaumont changed the title fix(kuma-cp): pass context via snapshot reconciler to generateCerts fix(kuma-cp): stop OnTick when watchdog stopped Jul 11, 2023
@michaelbeaumont michaelbeaumont added the ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) label Jul 12, 2023
@michaelbeaumont michaelbeaumont marked this pull request as ready for review July 12, 2023 08:52
@michaelbeaumont michaelbeaumont requested a review from a team as a code owner July 12, 2023 08:52
@michaelbeaumont michaelbeaumont requested review from Automaat and lobkovilya and removed request for a team July 12, 2023 08:52
@slonka
Copy link
Contributor

slonka commented Jul 12, 2023

WDYT? this is a good example of an "error" that's not an alarming error

might be interesting to know why it's nil, but if it recovers in 100% cases than switch from error -> warn

@michaelbeaumont michaelbeaumont changed the title fix(kuma-cp): stop OnTick when watchdog stopped fix(kuma-cp): cancel OnTick when watchdog stopped Jul 13, 2023
@michaelbeaumont michaelbeaumont merged commit 8be55a5 into kumahq:master Jul 13, 2023
@michaelbeaumont michaelbeaumont deleted the fix/watchdog branch July 13, 2023 15:18
@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2023

backporting to release-2.0 with action

backporting to release-2.1 with action
backporting to release-2.2 with action
backporting to release-1.8 with action

kumahq bot pushed a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
kumahq bot pushed a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
kumahq bot pushed a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
kumahq bot pushed a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
kumahq bot pushed a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Jul 13, 2023
…#7241)

fix(kuma-cp): cancel OnTick when watchdog stopped (#7221)

* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Jul 13, 2023
* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Jul 13, 2023
…#7242)

fix(kuma-cp): cancel OnTick when watchdog stopped (#7221)

* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
michaelbeaumont added a commit that referenced this pull request Jul 13, 2023
…#7240)

fix(kuma-cp): cancel OnTick when watchdog stopped (#7221)

* fix(kuma-cp): stop OnTick when watchdog stopped
* fix: contextcheck error
* test: update for signature change
* fix: check if stopped before ticking

Signed-off-by: Mike Beaumont <[email protected]>
Co-authored-by: Mike Beaumont <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants