-
Notifications
You must be signed in to change notification settings - Fork 367
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: clear stack watchers map when lost leader lease #5123
fix: clear stack watchers map when lost leader lease #5123
Conversation
3be7e7c
to
b9fd78e
Compare
This is still a work in progress. I intend to add a test. |
6c1bba3
to
4074da0
Compare
I have added a test. The test takes about 5 seconds as im beholden to the debouncing of the stack applier. |
c0aebe6
to
63a6c10
Compare
Signed-off-by: Ethan Mosbaugh <[email protected]>
Signed-off-by: Ethan Mosbaugh <[email protected]>
63a6c10
to
499fe61
Compare
} | ||
|
||
// Run runs the Manager | ||
func (m *Manager) Start(_ context.Context) error { | ||
m.log.Debug("Starting") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was largely lifted from the ExtensionsController
Can you maybe check if that's fixed by #5062, too? |
Yes. I will checkout your branch and run the tests from mine. They exhibit the issue prior to my change. |
Your change also solves the issue. I've created a pull request into your branch with my test from this one. Feel free to close this pr. |
This pull request has merge conflicts that need to be resolved. |
Description
When the lease is lost the context is cancelled and the stack processing loop exits (
"Stack done"
). Once the lease is re-aquired the stacks never get created because the map to prevent them from getting added twice is not cleared.https://github.com/k0sproject/k0s/pull/5123/files#diff-76a26da950291d89ea652adeec6f6108d7ef34165e027972910c934bbdcce264R206-R210
Fixes #5122
Type of change
How Has This Been Tested?
Checklist: