Skip to content

Commit 4a54088

Browse files
author
Michael Burke
committed
Document MCO drain behavior
1 parent 3f62df2 commit 4a54088

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

machine_configuration/index.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,22 @@ Previously, NetworkManager stored new network configurations to `/etc/sysconfig/
2323

2424
include::modules/understanding-machine-config-operator.adoc[leveloffset=+1]
2525

26+
[role="_additional-resources"]
2627
.Additional resources
2728

2829
* xref:../networking/openshift_sdn/about-openshift-sdn.adoc#about-openshift-sdn[About the OpenShift SDN network plugin]
2930
3031
include::modules/machine-config-overview.adoc[leveloffset=+1]
3132

33+
include::modules/machine-config-node-drain.adoc[leveloffset=+1]
34+
35+
[role="_additional-resources"]
36+
.Additional resources
37+
38+
* xref:../machine_configuration/index.adoc#about-machine-config-operator_machine-config-overview[About the Machine Config Operator]
39+
* xref:../machine_configuration/machine-config-node-disruption.adoc#machine-configs-configure[Using node disruption policies to minimize disruption from machine config changes]
40+
* xref:../support/troubleshooting/troubleshooting-operator-issues.adoc#troubleshooting-disabling-autoreboot-mco_troubleshooting-operator-issues[Disabling the Machine Config Operator from automatically rebooting]
41+
3242
include::modules/machine-config-drift-detection.adoc[leveloffset=+1]
3343

3444
include::modules/checking-mco-status.adoc[leveloffset=+1]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine-configuration/index.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="machine-config-node-drain_{context}"]
7+
= Understanding the Machine Config Operator node drain behavior
8+
9+
When you use a machine config to change a system feature, such as adding new config files, modifying systemd units or kernel arguments, or updating SSH keys, the Machine Config Operator (MCO) applies those changes and ensures that each node is in the desired configuration state.
10+
11+
After you make the changes, the MCO generates a new rendered machine config. In the majority of cases, when applying the new rendered machine config, the Operator performs the following steps on each affected node until all of the affected nodes have the updated configuration:
12+
13+
. Cordon. The MCO marks the node as not schedulable for additional workloads.
14+
. Drain. The MCO terminates all running workloads on the node, causing the workloads to be rescheduled onto other nodes.
15+
. Apply. The MCO writes the new configuration to the nodes as needed.
16+
. Reboot. The MCO restarts the node.
17+
. Uncordon. The MCO marks the node as schedulable for workloads.
18+
19+
Throughout this process, the MCO maintains the required number of pods based on the `MaxUnavailable` value set in the machine config pool.
20+
21+
If the MCO drains pods on the master node, note the following conditions:
22+
23+
* In {sno} clusters, the MCO skips the drain operation.
24+
25+
* The MCO does not drain static pods in order to prevent interference with services, such as etcd.
26+
27+
[NOTE]
28+
====
29+
In certain cases the nodes are not drained. For more information, see "About the Machine Config Operator."
30+
====
31+
32+
There are ways to mitigate the disruption caused by drain and reboot cycles by using node disruption policies or disabling control plane reboots. For more information, see "Understanding node restart behaviors after machine config changes" and "Disabling the Machine Config Operator from automatically rebooting."

0 commit comments

Comments
 (0)