Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/machine-config-node-disruption-config.adoc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] AsciiDocDITA.ShortDescription: Assign [role="_abstract"] to a paragraph to use it as in DITA.

Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -117,7 +117,7 @@ status:
- restart:
serviceName: crio.service
type: Restart
name: test.se
name: test.service
# ...
----
<1> Specifies the current cluster-validated policies.
46 changes: 22 additions & 24 deletions modules/machine-config-node-disruption-example.adoc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] AsciiDocDITA.TaskContents: The '.Procedure' block title is missing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] AsciiDocDITA.ShortDescription: Assign [role="_abstract"] to a paragraph to use it as in DITA.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 [error] AsciiDocDITA.TaskTitle: Unsupported titles cannot be mapped to DITA tasks.

[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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is targeting a different location than the one stated by the description above

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]
Expand All @@ -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
# ...
----

Expand Down Expand Up @@ -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
----
2 changes: 1 addition & 1 deletion snippets/machine-config-node-disruption-actions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
====
Expand Down