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

handleAuxUpdated causes push of empty config on startup #45

Open
ibot3 opened this issue Jan 18, 2023 · 1 comment
Open

handleAuxUpdated causes push of empty config on startup #45

ibot3 opened this issue Jan 18, 2023 · 1 comment

Comments

@ibot3
Copy link
Contributor

ibot3 commented Jan 18, 2023

The handleAuxUpdated function of the controller enqueues a UpdateConfigJob:

func (c *Controller) handleAuxUpdated(obj interface{}) {
// FIXME: it would probably be good to filter this a little instead of just
// updating on all changes.
c.worker.EnqueueJob(&UpdateConfigJob{})
}

The function is called by several informers, for example nodeInformer, endpointsInformer and networkPoliciesInformer.

The problem is that this causes the function to be called several times on startup which in turn creates UpdateConfigJobs. An UpdateConfigJob is therefore run before even one SyncServiceJob has been successfully executed.
This results in an empty config to be pushed to the agent on startup.

Possible solutions:

  • Subscribe to the informers only after all services have been synced once
  • Increase timeout for UpdateConfigJob scheduling (enough time so that the job is not executed before the ``SyncServiceJobs`)
  • ?
@ibot3
Copy link
Contributor Author

ibot3 commented Jan 18, 2023

I created a gist with the controller output log with additional log output for new enqueued jobs (job name + stacktrace):
https://gist.github.com/ibot3/e60317fdd58eecbcaaf3a8f9d4676839

The SyncServiceJobs start in line 379.

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

No branches or pull requests

1 participant