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
fix initial race between template and render sub-controllers #338
Even with the delay from #303
we've still been seeing races; #337
is a further band-aid but obviously not a complete solution.
Currently the template controller generates 3 fragments (base, ssh, kubelet) and my osimage work is about to extend that to 4.
The render controller can see any from 1 to 3 (or 4 post-osimageurl) MCs.
One approach is for the template controller to only generate 00-{master,worker}. That gives us atomicity. We could easily do this by just appending the Ignition internally.
This is primarily an issue on initial cluster bringup; hopefully the work that landed to have the controller only render MCs from its own version addresses upgrade issues.
Another solution would be for the render sub-controller to wait until the template sub-controller has signaled that it's done an initial complete generation.
(The "just merge them" approach would be trivial for ssh which is part of the template code, but not for kubelet which is currently structured as a sub-controller)
One thing that came up in conversation about this issue is that things fail rather badly if we don't include the kubelet config in the rendered config, as it means the node will drop out of the cluster. I've seen this happen in some PRs myself (pods going NodeLost); it's particularly bad if it hits a master.
Since #337 landed I no longer see I0122 20:03:10.258500 1 node_controller.go:336] Error syncing machineconfigpool worker: Operation cannot be fulfilled on machineconfigpools.machineconfiguration.openshift.io "worker": the object has been modified; please apply your changes to the latest version and try again in my MCC logs.
Maybe rather than starting all of the sub-controllers concurrently, we want to do something like:
Start all sub-generators [today kubelet, could also think of ssh this way]
Start the render controller
Start the node controller
And each phase waits for readiness. That way the render controller will always see a full run of our internal MCs. And the node controller can't do anything until something is rendered, so there's no point spamming logs that the pool has an empty MC.
fix here 9e3ad65 in #482 (have the render controller try and error till the template controller is done, more in line with the whole controller pylosophy). Logs with proof that we're not waiting on the template controller is here:
I0317 16:27:21.495296 1 node_controller.go:383] Pool master is unconfigured, pausing 5s for renderer to initialize
I0317 16:27:21.495462 1 node_controller.go:383] Pool worker is unconfigured, pausing 5s for renderer to initialize
I0317 16:27:21.495537 1 render_controller.go:380] Error syncing machineconfigpool master: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.495584 1 render_controller.go:380] Error syncing machineconfigpool worker: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.501140 1 render_controller.go:380] Error syncing machineconfigpool master: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.501180 1 render_controller.go:380] Error syncing machineconfigpool worker: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.511368 1 render_controller.go:380] Error syncing machineconfigpool master: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.511407 1 render_controller.go:380] Error syncing machineconfigpool worker: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.531622 1 render_controller.go:380] Error syncing machineconfigpool master: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.531647 1 render_controller.go:380] Error syncing machineconfigpool worker: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.571897 1 render_controller.go:380] Error syncing machineconfigpool worker: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.571897 1 render_controller.go:380] Error syncing machineconfigpool master: ControllerConfig has not completed: completed(false) running(false) failing(true)
I0317 16:27:21.671461 1 render_controller.go:500] Generated machineconfig worker-b058168e9ec42a1704343e84bb2dc7eb from 4 configs: [{MachineConfig 00-worker machineconfiguration.openshift.io/v1 } {MachineConfig 00-worker-ssh machineconfiguration.openshift.io/v1 } {MachineConfig 01-worker-container-runtime machineconfiguration.openshift.io/v1 } {MachineConfig 01-worker-kubelet machineconfiguration.openshift.io/v1 }]
I0317 16:27:21.684235 1 render_controller.go:500] Generated machineconfig master-34908aca2b6075843cc77cd59449a0df from 4 configs: [{MachineConfig 00-master machineconfiguration.openshift.io/v1 } {MachineConfig 00-master-ssh machineconfiguration.openshift.io/v1 } {MachineConfig 01-master-container-runtime machineconfiguration.openshift.io/v1 } {MachineConfig 01-master-kubelet machineconfiguration.openshift.io/v1 }]
Activity
kikisdeliveryservice commentedon Jan 22, 2019
Example logs from the race seen today:
kikisdeliveryservice commentedon Jan 22, 2019
More:
cgwalters commentedon Jan 22, 2019
(The "just merge them" approach would be trivial for ssh which is part of the template code, but not for kubelet which is currently structured as a sub-controller)
cgwalters commentedon Jan 23, 2019
One thing that came up in conversation about this issue is that things fail rather badly if we don't include the kubelet config in the rendered config, as it means the node will drop out of the cluster. I've seen this happen in some PRs myself (pods going
NodeLost); it's particularly bad if it hits a master.kikisdeliveryservice commentedon Jan 24, 2019
Since #337 landed I no longer see
I0122 20:03:10.258500 1 node_controller.go:336] Error syncing machineconfigpool worker: Operation cannot be fulfilled on machineconfigpools.machineconfiguration.openshift.io "worker": the object has been modified; please apply your changes to the latest version and try againin my MCC logs.cgwalters commentedon Jan 25, 2019
Looks like this PR hit it too: https://gcsweb-ci.svc.ci.openshift.org/gcs/origin-ci-test/pr-logs/pull/21843/pull-ci-openshift-origin-master-e2e-aws/2817/artifacts/e2e-aws/pods/
kikisdeliveryservice commentedon Jan 25, 2019
See also PR #339 for work related to this issue.
cgwalters commentedon Jan 27, 2019
@abhinavdahiya Do we think #339 fixed this?
cgwalters commentedon Feb 1, 2019
Still seeing this even after #339 - in a libvirt cluster I just ran:
And f31d48f definitely includes #339
cgwalters commentedon Feb 1, 2019
Maybe rather than starting all of the sub-controllers concurrently, we want to do something like:
And each phase waits for readiness. That way the render controller will always see a full run of our internal MCs. And the node controller can't do anything until something is rendered, so there's no point spamming logs that the pool has an empty MC.
cgwalters commentedon Feb 5, 2019
Sketching this out:
runcom commentedon Mar 17, 2019
fix here 9e3ad65 in #482 (have the render controller try and error till the template controller is done, more in line with the whole controller pylosophy). Logs with proof that we're not waiting on the template controller is here:
Merge pull request openshift#338 from gabemontero/more-aggressive-pro…