Skip to content

Commit a8e4c4e

Browse files
authored
Merge pull request #28090 from mburke5678/mco-avoid-reboots
Avoid reboots in select cases
2 parents f75c317 + 6497751 commit a8e4c4e

8 files changed

+39
-13
lines changed

modules/images-configuration-file.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
You can configure image registry settings by editing the
1010
`image.config.openshift.io/cluster` resource. The
1111
Machine Config Operator (MCO) watches the
12-
`image.config.openshift.io/cluster` for any changes to registries
13-
and reboots the nodes when it detects changes.
12+
`image.config.openshift.io/cluster` resource for any changes to the registries.
13+
When the MCO detects a change, it drains the nodes, applies the change,
14+
and uncordons the nodes.
1415

1516
.Procedure
1617

modules/images-configuration-insecure.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,13 @@ status:
5757
registries are allowed. Either `blockedRegistries` or `allowedRegistries` can be set, but not both.
5858
<3> Specify registries that should be permitted for image pull and push actions. All other registries are denied. Either `blockedRegistries` or `allowedRegistries` can be set, but not both.
5959
+
60-
The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster`
61-
for any changes to registries and reboots the nodes when it detects changes.
62-
Changes to the registries appear in the `/host/etc/containers/registries.conf` file on each node.
60+
The Machine Config Operator (MCO) watches the `image.config.openshift.io/cluster` resource
61+
for any changes to registries. When the MCO detects a change, it drains the nodes, applies the change, reloads the `crio` systemd service on the host, and uncordons the nodes. Changes to the registries appear in the `/etc/containers/registries.conf` file on each node.
62+
+
63+
[NOTE]
64+
====
65+
As of {product-title} 4.7, changes to the registries no longer trigger a reboot.
66+
====
6367
+
6468
[source,terminal]
6569
----

modules/images-configuration-parameters.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ registries are allowed.
6565
`allowedRegistries`: Allowlisted for image pull and push actions. All other
6666
registries are blocked.
6767

68-
Only one of `blockedRegistries` or `allowedRegistries` may be set
68+
Only one of `blockedRegistries` or `allowedRegistries` can be set.
6969

7070
|===
7171

modules/images-update-global-pull-secret.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ You can update the global pull secret for your cluster.
1212
Cluster resources must adjust to the new pull secret, which can temporarily limit the usability of the cluster.
1313
====
1414

15-
[WARNING]
15+
Updating the global pull secret causes the Machine Config Operator to drain the nodes, apply the change, and uncordon the nodes.
16+
17+
[NOTE]
1618
====
17-
Updating the global pull secret will cause node reboots while the Machine Config Operator (MCO) syncs the changes.
19+
As of {product-title} 4.7, changes to the global pull secret no longer trigger a reboot.
1820
====
1921

2022
.Prerequisites

modules/machine-config-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ CRI-O and Kubelet, the kernel, Network Manager and other
1111
system features.
1212
It also offers a MachineConfig CRD that can write configuration files
1313
onto the host (see
14-
link:https://github.com/openshift/machine-config-operator#machine-config-operator[machine-config-operator])
14+
link:https://github.com/openshift/machine-config-operator#machine-config-operator[machine-config-operator]).
1515
Understanding what MCO does and how it interacts with other components
1616
is critical to making advanced, system-level changes to an
1717
{product-title} cluster. Here are some things you should know about MCO,

modules/nodes-pods-secrets-creating.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ a pod in three ways:
2525

2626
Volume type secrets write data into the container as a file using the volume
2727
mechanism. Image pull secrets use service accounts for the automatic injection of
28-
the secret into all pods in a namespaces.
28+
the secret into all pods in a namespace.
2929

3030
When a template contains a secret definition, the only way for the template to
3131
use the provided secret is to ensure that the secret volume sources are

modules/troubleshooting-disabling-autoreboot-mco.adoc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
// * support/troubleshooting/troubleshooting-operator-issues.adoc
44

55
[id="troubleshooting-disabling-autoreboot-mco_{context}"]
6-
= Disabling Machine Config Operator from automatically rebooting
6+
= Disabling Machine Config Operator from automatically rebooting
77

8-
When configuration changes are made by the Machine Config Operator, {op-system-first} must reboot for the changes to take effect. Whether the configuration change is automatic, such as when a `kube-apiserver-to-kubelet-signer` CA is rotated, or manual, such as when a registry or SSH key is updated, an {op-system} node reboots automatically unless it is paused.
8+
When configuration changes are made by the Machine Config Operator (MCO), {op-system-first} must reboot for the changes to take effect. Whether the configuration change is automatic, such as when a `kube-apiserver-to-kubelet-signer` certificate authority (CA) is rotated, or manual, an {op-system} node reboots automatically unless it is paused.
9+
10+
[NOTE]
11+
====
12+
The following modifications do not trigger a node reboot:
13+
14+
* changes to the SSH key in the `spec.config.ignition.passwd.users.sshAuthorizedKeys` parameter of a machine config
15+
* changes to the global pull secret or pull secret in the `openshift-config` namespace
16+
* changes to the `/etc/containers/registries.conf` file, such as adding or editing an `ImageContentSourcePolicy` object
17+
18+
When the MCO detects any of these changes, it drains the corresponding nodes, applies the changes, and uncordons the nodes.
19+
====
920

1021
To avoid unwanted disruptions, you can modify the machine config pool to prevent automatic rebooting after the Operator makes changes to the machine config.
1122

modules/understanding-machine-config-operator.adoc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,16 @@ When you perform node management operations, you create or modify a
4141

4242
[IMPORTANT]
4343
====
44-
When changes are made to a machine configuration, the Machine Config Operator automatically reboots all corresponding nodes in order for the changes to take effect.
44+
When changes are made to a machine configuration, the Machine Config Operator (MCO) automatically reboots all corresponding nodes in order for the changes to take effect.
4545
4646
To prevent the nodes from automatically rebooting after machine configuration changes, before making the changes, you must pause the autoreboot process by setting the `spec.paused` field to `true` in the corresponding machine config pool. When paused, machine configuration changes are not applied until you set the `spec.paused` field to `false` and the nodes have rebooted into the new configuration.
47+
48+
The following modifications do not trigger a node reboot:
49+
50+
* changes to the SSH key in the `spec.config.ignition.passwd.users.sshAuthorizedKeys` parameter of a machine config
51+
* changes to the global pull secret or pull secret in the `openshift-config` namespace
52+
* changes to the `/etc/containers/registries.conf` file, such as adding or editing an `ImageContentSourcePolicy` object
53+
54+
When the MCO detects any of these changes, it drains the corresponding nodes, applies the changes, and uncordons the nodes.
4755
====
4856

0 commit comments

Comments
 (0)