You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Applied ImageConfig cluster on MachineConfigPool" logs too frequently? #453
If you deploy with the latest MCO, you'll get something like this in logs, haven't had any time to debug but I don't expect it to happen if nothing changes in the image crd right?
those are the logs from the controller in openshift-image-config-operator namespace:
Yeah it shouldn't. But this looks like the image config informer keeps saying that the image CR has been updated every 20 mins or so. Plus you see two of each log because there are two MCPs and it applies the image config changes to both.
I guess I could add a check to see if there were any changes to the RegistrySources field when the informer says an update has happened.
I saw this as well on a new cluster that was basically idle after spinning it up (ie made no changes or did anything with it but still saw the logging).
right but we would love to not run a resync if the config hasn't updated wrt what we previously observed. In the Kubelet and ContainerRuntime Config(s) we skip a sync if we already observed that given generation (meaning, the object hasn't changed). The Images CRD doesn't have an ObservedGeneration in its status, so I'm wondering how can we filter out not needed resync.
I noticed the same thing happening for the two CRs, Infrastructure and Network, that the operator keeps track of - it also gets a resync about every 20 mins.
I opened #461 with an extra filter to double check that an actual change has happened to registrySources from the image CR before applying any changes.
Not sure how exactly we want to handle the resync + observation.
Activity
umohnani8 commentedon Feb 18, 2019
Yeah it shouldn't. But this looks like the image config informer keeps saying that the image CR has been updated every 20 mins or so. Plus you see two of each log because there are two MCPs and it applies the image config changes to both.
I guess I could add a check to see if there were any changes to the RegistrySources field when the informer says an update has happened.
runcom commentedon Feb 18, 2019
yeah, let's understand why we're getting that as well if it's not supposed to do that (or as you said, filter out stuff when nothing has changed).
kikisdeliveryservice commentedon Feb 19, 2019
I saw this as well on a new cluster that was basically idle after spinning it up (ie made no changes or did anything with it but still saw the logging).
umohnani8 commentedon Feb 19, 2019
So we start a
sharedFactoryInformer(https://github.com/openshift/machine-config-operator/blob/master/cmd/common/controller_context.go#L44) with the objects that have informers/listers in client-go and set theresyncPeriodto about 20 minutes in https://github.com/openshift/machine-config-operator/blob/master/cmd/common/helpers.go#L31. This just resyncs the listers every few minutes to ensure that we have the most up to date cache of the object.I followed what the
Informers.AddEventHandlerfunction does, and it looks like everyresyncPeriodit adds a notification of the object and sends it over, so we get that the object has been updated. The controller sees that and calls thesyncImageHandlerfunction to update the registries.conf.runcom commentedon Feb 19, 2019
right but we would love to not run a resync if the config hasn't updated wrt what we previously observed. In the Kubelet and ContainerRuntime Config(s) we skip a sync if we already observed that given generation (meaning, the object hasn't changed). The Images CRD doesn't have an ObservedGeneration in its status, so I'm wondering how can we filter out not needed resync.
umohnani8 commentedon Feb 19, 2019
I noticed the same thing happening for the two CRs, Infrastructure and Network, that the operator keeps track of - it also gets a resync about every 20 mins.
I opened #461 with an extra filter to double check that an actual change has happened to registrySources from the image CR before applying any changes.
Not sure how exactly we want to handle the resync + observation.