-
Notifications
You must be signed in to change notification settings - Fork 330
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
PR #1658 is preventing resync period of informer to be overwritten #1756
Comments
The order of controller setup and informer setup has not changed: It was:
Additionally, |
You are right, it is the setup of controller and start of informers. We might just need a way to call |
@mattmoor had some insight about calling start informers before the controllers get a chance to start, not clear I changed that. Might have been a bug before and still? |
I think that's probably a different problem. Here the problem is that during controller setup, the controllers will add event handlers to informers with resync period set, which will be ignored now because the resync period cannot be changed. So the problem in this issue is "start of informer" vs "setup of controller". Your previous PR moved the "start of informer" before "setup of controller". |
@n3wscott We used to call StartInformers below this line, now it is in a go routine above it: https://github.com/knative/pkg/pull/1658/files#diff-7a2878cf5c6550229d8ac30e0d5e74e2R250 |
I see @zhongduo pointed that out above 🤦 |
This issue is stale because it has been open for 90 days with no |
I believe this was fixed. /assign @n3wscott |
Yes, it is already fixed. |
/kind bug
PR #1658 changes the order of informer setup and controller setup, however the resync period of informer can only be overwritten before the informer is started. As a result, all the event handler with customized resync period will have the default of 10 hours resync period after this PR.
Expected Behavior
Event handlers in
AddEventHandlerWithResyncPeriod
with resync period set to 5 mins should get called every 5 mins.Actual Behavior
The event handlers above will only get called every 10 hours or whatever the k8s default has.
Steps to Reproduce the Problem
In any controller code using
Informer().AddEventHandlerWithResyncPeriod
add resync period of 5 mins, following error will be found when the controller is started.W0922 21:37:44.196866 1 shared_informer.go:461] resyncPeriod 300000000000 is smaller than resyncCheckPeriod 36000000000000 and the informer has already started. Changing it to 36000000000000
Additional Info
The text was updated successfully, but these errors were encountered: