Skip to content

Commit 658df14

Browse files
authored
Merge pull request #81321 from mburke5678/mco-node-disruption-ga
OCPSTRAT 1026:Admin-defined reboot & drain policies: Phase 2 (GA)
2 parents b9a5e90 + a20eefd commit 658df14

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

machine_configuration/machine-config-node-disruption.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@ The MCO does not validate whether a change can be successfully applied by your n
2424

2525
For example, you can configure a node disruption policy so that sudo configurations do not require a node drain and reboot. Or, you can configure your cluster so that updates to `sshd` are applied with only a reload of that one service.
2626

27-
:FeatureName: The node disruption policy feature
28-
include::snippets/technology-preview.adoc[]
29-
3027
You can control the behavior of the MCO when making the changes to the following Ignition configuration objects:
3128

3229
// I used this wording for the objects to match the previous section in the assembly: file:///home/mburke/openshift-docs/_preview/openshift-enterprise/mco-node-disruption-policy/post_installation_configuration/machine-configuration-tasks.html#what-can-you-change-with-machine-configs.
33-
* *configuration files*: You add to or update the files in the `/var` or `/etc` directory.
34-
* *systemd units*: You create and set the status of a systemd service or modify an existing systemd service.
30+
* *configuration files*: You add to or update the files in the `/var` or `/etc` directory. You can configure a policy for a specific file anywhere in the directory or for a path to a specific directory. For a path, a change or addition to any file in that directory triggers the policy.
31+
+
32+
[NOTE]
33+
====
34+
If a file is included in more than one policy, only the policy with the best match to that file is applied.
35+
36+
For example, if you have a policy for the `/etc/` directory and a policy for the `/etc/pki/` directory, a change to the `/etc/pki/tls/certs/ca-bundle.crt` file would apply the `etc/pki` policy.
37+
====
38+
39+
* *systemd units*: You create and set the status of a systemd service or modify a systemd service.
3540
* *users and groups*: You change SSH keys in the `passwd` section postinstallation.
3641
* *ICSP*, *ITMS*, *IDMS* objects: You can remove mirroring rules from an `ImageContentSourcePolicy` (ICSP), `ImageTagMirrorSet` (ITMS), and `ImageDigestMirrorSet` (IDMS) object.
3742

modules/machine-config-node-disruption-example.adoc

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,26 @@ status:
4848
- actions:
4949
- type: Special
5050
path: /etc/containers/registries.conf
51+
- actions:
52+
- reload:
53+
serviceName: crio.service
54+
type: Reload
55+
path: /etc/containers/registries.d
56+
- actions:
57+
- type: None
58+
path: /etc/nmstate/openshift
59+
- actions:
60+
- restart:
61+
serviceName: coreos-update-ca-trust.service
62+
type: Restart
63+
- restart:
64+
serviceName: crio.service
65+
type: Restart
66+
path: /etc/pki/ca-trust/source/anchors/openshift-config-user-ca-bundle.crt
5167
sshkey:
5268
actions:
5369
- type: None
54-
readyReplicas: 0
70+
observedGeneration: 9
5571
----
5672

5773
In the following example, when changes are made to the SSH keys, the MCO drains the cluster nodes, reloads the `crio.service`, reloads the systemd configuration, and restarts the `crio-service`.
@@ -80,7 +96,7 @@ spec:
8096
# ...
8197
----
8298

83-
In the following example, when changes are made to the `/etc/chrony.conf` file, the MCO reloads the `chronyd.service` on the cluster nodes.
99+
In the following example, when changes are made to the `/etc/chrony.conf` file, the MCO reloads the `chronyd.service` on the cluster nodes. If files are added to or modified in the `/var/run` directory, the MCO applies the changes with no further action.
84100

85101
.Example node disruption policy for a configuration file change
86102
[source,yaml]
@@ -98,7 +114,10 @@ spec:
98114
- reload:
99115
serviceName: chronyd.service
100116
type: Reload
101-
path: /etc/chrony.conf
117+
path: /etc/chrony.conf
118+
- actions:
119+
- type: None
120+
path: /var/run
102121
----
103122

104123
In the following example, when changes are made to the `auditd.service` systemd unit, the MCO drains the cluster nodes, reloads the `crio.service`, reloads the systemd manager configuration, and restarts the `crio.service`.

0 commit comments

Comments
 (0)