diff --git a/modules/machine-config-node-disruption-config.adoc b/modules/machine-config-node-disruption-config.adoc index 9f41fef23d3a..406a002fc34c 100644 --- a/modules/machine-config-node-disruption-config.adoc +++ b/modules/machine-config-node-disruption-config.adoc @@ -58,7 +58,7 @@ spec: - restart: serviceName: crio.service type: Restart - name: test.service + name: sshd.service ---- <1> Specifies the node disruption policy. <2> Specifies a list of machine config file definitions and actions to take to changes on those paths. This list supports a maximum of 50 entries. @@ -117,7 +117,7 @@ status: - restart: serviceName: crio.service type: Restart - name: test.se + name: test.service # ... ---- <1> Specifies the current cluster-validated policies. diff --git a/modules/machine-config-node-disruption-example.adoc b/modules/machine-config-node-disruption-example.adoc index 45ccbca300b4..c8adc9abe950 100644 --- a/modules/machine-config-node-disruption-example.adoc +++ b/modules/machine-config-node-disruption-example.adoc @@ -73,7 +73,27 @@ status: The default node disruption policy does not contain a policy for changes to the `/etc/containers/registries.conf.d` file. This is because both {product-title} and {op-system-base-full} use the `registries.conf.d` file to specify aliases for image short names. It is recommended that you always pull an image by its fully-qualified name. This is particularly important with public registries, because the image might not deploy if the public registry requires authentication. You can create a user-defined policy to use with the `/etc/containers/registries.conf.d` file, if you need to use image short names. -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`. +In the following example, when changes are made to the `registries.conf.d` file, the MCO restarts the `crio-service`. + +.Example node disruption policy for a change to the `registries.conf` file +[source,yaml] +---- +apiVersion: operator.openshift.io/v1 +kind: MachineConfiguration +metadata: + name: cluster + namespace: openshift-machine-config-operator +spec: + nodeDisruptionPolicy: + files: + - path: /etc/containers/registries.conf.d + actions: + - type: Restart + - restart: + serviceName: crio.service +---- + +In the following example, when changes are made to the SSH keys, the MCO reloads the systemd configuration, and restarts the `crio-service`. .Example node disruption policy for an SSH key change [source,yaml] @@ -87,14 +107,10 @@ spec: nodeDisruptionPolicy: sshkey: actions: - - type: Drain - - reload: - serviceName: crio.service - type: Reload - type: DaemonReload - restart: serviceName: crio.service - type: Restart + type: Restart # ... ---- @@ -145,21 +161,3 @@ spec: restart: serviceName: crio.service ---- - -In the following example, when changes are made to the `registries.conf` file, such as by editing an `ImageContentSourcePolicy` (ICSP) object, the MCO does not drain or reboot the nodes and applies the changes with no further action. - -.Example node disruption policy for a registries.conf file change -[source,yaml] ----- -apiVersion: operator.openshift.io/v1 -kind: MachineConfiguration -metadata: - name: cluster -# ... -spec: - nodeDisruptionPolicy: - files: - - actions: - - type: None - path: /etc/containers/registries.conf ----- diff --git a/snippets/machine-config-node-disruption-actions.adoc b/snippets/machine-config-node-disruption-actions.adoc index d7fbecbe35e9..f3f32440238f 100644 --- a/snippets/machine-config-node-disruption-actions.adoc +++ b/snippets/machine-config-node-disruption-actions.adoc @@ -11,7 +11,7 @@ When you make any of these changes, the node disruption policy determines which * *Reload*: For services, the MCO reloads the specified services without restarting the service. * *Restart*: For services, the MCO fully restarts the specified services. * *DaemonReload*: The MCO reloads the systemd manager configuration. -* *Special*: This is an internal MCO-only action and cannot be set by the user. +* *Special*: This is an internal MCO-only action that is set by default for changes to the `/etc/containers/registries.conf` file. When this action is set, the MCO determines if a node cordon and drain is required, based on the changed content in the `registries.conf` file. You can override this default. However, it is not recommended to override this setting. You cannot set this action for another path or service. [NOTE] ====