-
Notifications
You must be signed in to change notification settings - Fork 369
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
made sure that manager is started before staleController #6645
made sure that manager is started before staleController #6645
Conversation
@DarkInfernus do you have logs from before and after the change, so we can confirm that the fix is valid? |
Hi @antoninbas actually this is my first ever open source contribution, my pr is failing multiple checks, actually i did not check for the previous logs and after logs. I just looked at the code and as per my knowledge of go lang i think this error is happening because we are starting the go routine for running stalecontroller before starting the manager. So i thought it to be intuitive to start the go routine later. |
But final call should be made after checking the before logs and after logs.For that I would need to set up the project locally but unfortunately I don't know how to do that. |
@DarkInfernus The only way to fix this issue is to first reproduce it locally, understand the code and make the necessary changes, then confirm the issue has been resolved by testing the updated code. |
|
||
klog.InfoS("Leader MC Controller Starting Manager") | ||
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { | ||
return fmt.Errorf("error running Manager: %v", err) | ||
} | ||
|
||
go staleController.Run(stopCh) |
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.
Hi, I don't think this change will fix the issue, please check my comment on the issue #6152 (comment).
Even we started this after the Controller Manager, it doesn't guarantee that caches are ready before it.
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.
Ok , i will make the required changes in the code and raise another pr.
Bug fix for the issue #6152