Skip to content

Commit c77837b

Browse files
authored
Merge pull request #71004 from skopacz1/OSDOCS-9497
OSDOCS#9497: editing canary rollout update page
2 parents bfcf720 + 1301ec6 commit c77837b

6 files changed

+131
-54
lines changed

modules/update-using-custom-machine-config-pools-about.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@
66
[id="update-using-custom-machine-config-pools-about_{context}"]
77
= About performing a canary rollout update
88

9-
This topic describes the general workflow of this canary rollout update process. The steps to perform each task in the workflow are described in the following sections.
9+
The following steps outline the high-level workflow of the canary rollout update process:
1010

11-
. Create MCPs based on the worker pool. The number of nodes in each MCP depends on a few factors, such as your maintenance window duration for each MCP, and the amount of reserve capacity, meaning extra worker nodes, available in your cluster.
11+
. Create custom machine config pools (MCP) based on the worker pool.
1212
+
1313
[NOTE]
1414
====
15-
You can change the `maxUnavailable` setting in an MCP to specify the percentage or the number of machines that can be updating at any given time. The default is 1.
15+
You can change the `maxUnavailable` setting in an MCP to specify the percentage or the number of machines that can be updating at any given time. The default is `1`.
1616
====
1717

1818
. Add a node selector to the custom MCPs. For each node that you do not want to update simultaneously with the rest of the cluster, add a matching label to the nodes. This label associates the node to the MCP.
1919
+
20-
[NOTE]
20+
[IMPORTANT]
2121
====
22-
Do not remove the default worker label from the nodes. The nodes *must* have a role label to function properly in the cluster.
22+
Do not remove the default worker label from the nodes. The nodes must have a role label to function properly in the cluster.
2323
====
2424

2525
. Pause the MCPs you do not want to update as part of the update process.
2626

2727
. Perform the cluster update. The update process updates the MCPs that are not paused, including the control plane nodes.
2828

29-
. Test the applications on the updated nodes to ensure they are working as expected.
29+
. Test your applications on the updated nodes to ensure they are working as expected.
3030

31-
. Unpause the remaining MCPs one-by-one and test the applications on those nodes until all worker nodes are updated. Unpausing an MCP starts the update process for the nodes associated with that MCP. You can check the progress of the update from the web console by clicking *Administration* -> *Cluster settings*. Or, use the `oc get machineconfigpools` CLI command.
31+
. Unpause one of the remaining MCPs, wait for the nodes in that pool to finish updating, and test the applications on those nodes.
32+
Repeat this process until all worker nodes are updated.
3233

33-
. Optionally, remove the custom label from updated nodes and delete the custom MCPs.
34+
. Optional: Remove the custom label from updated nodes and delete the custom MCPs.

modules/update-using-custom-machine-config-pools-mcp-remove.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
[id="update-using-custom-machine-config-pools-mcp-remove_{context}"]
66
= Moving a node to the original machine config pool
77

8-
In this canary rollout update process, after you have unpaused a custom machine config pool (MCP) and verified that the applications on the nodes associated with that MCP are working as expected, you should move the node back to its original MCP by removing the custom label you added to the node.
8+
After you update and verify applications on nodes in a custom machine config pool (MCP), move the nodes back to their original MCP by removing the custom label that you added to the nodes.
99

1010
[IMPORTANT]
1111
====
1212
A node must have a role to be properly functioning in the cluster.
1313
====
1414

15-
To move a node to its original MCP:
15+
.Procedure
1616

1717
////
1818
. Ensure that the nodes have a `worker` label or a label from an MCP that is updated.
@@ -32,11 +32,11 @@ error: 'node-role.kubernetes.io/worker' already has a value (), and --overwrite
3232
If the node does not have a `worker` label or a label from an updated MCP, add the label.
3333
////
3434

35-
. Remove the custom label from the node.
35+
. For each node in a custom MCP, remove the custom label from the node by running the following command:
3636
+
3737
[source,terminal]
3838
----
39-
$ oc label node <node_name> node-role.kubernetes.io/<custom-label>-
39+
$ oc label node <node_name> node-role.kubernetes.io/<custom_label>-
4040
----
4141
+
4242
For example:
@@ -53,15 +53,16 @@ $ oc label node ci-ln-0qv1yp2-f76d1-kl2tq-worker-a-j2ssz node-role.kubernetes.io
5353
node/ci-ln-0qv1yp2-f76d1-kl2tq-worker-a-j2ssz labeled
5454
----
5555
+
56-
The MCO moves the nodes back to the original MCP and reconciles the node to the MCP configuration.
56+
The Machine Config Operator moves the nodes back to the original MCP and reconciles the node to the MCP configuration.
5757

58-
. View the list of MCPs in the cluster and their current state:
58+
. To ensure that node has been removed from the custom MCP, view the list of MCPs in the cluster and their current state by running the following command:
5959
+
6060
[source,terminal]
6161
----
62-
$oc get mcp
62+
$ oc get mcp
6363
----
6464
+
65+
.Example output
6566
[source,terminal]
6667
----
6768
NAME CONFIG UPDATED UPDATING DEGRADED MACHINECOUNT READYMACHINECOUNT UPDATEDMACHINECOUNT DEGRADEDMACHINECOUNT AGE
@@ -70,9 +71,9 @@ workerpool-canary rendered-mcp-noupdate-5ad4791166c468f3a35cd16e734c9028 Tru
7071
worker rendered-worker-5ad4791166c468f3a35cd16e734c9028 True False False 3 3 3 0 61m
7172
----
7273
+
73-
The node is removed from the custom MCP and moved back to the original MCP. It can take several minutes to update the machine counts. In this example, one node was moved from the removed `workerpool-canary` MCP to the `worker`MCP.
74+
When the node is removed from the custom MCP and moved back to the original MCP, it can take several minutes to update the machine counts. In this example, one node was moved from the removed `workerpool-canary` MCP to the `worker` MCP.
7475

75-
. Optional: Delete the custom MCP:
76+
. Optional: Delete the custom MCP by running the following command:
7677
+
7778
[source,terminal]
7879
----

modules/update-using-custom-machine-config-pools-mcp.adoc

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[id="update-using-custom-machine-config-pools-mcp_{context}"]
66
= Creating machine config pools to perform a canary rollout update
77

8-
The first task in performing this canary rollout update is to create one or more machine config pools (MCP).
8+
To perform a canary rollout update, you must first create one or more custom machine config pools (MCP).
99

10-
. Create an MCP from a worker node.
10+
.Procedure
1111

12-
.. List the worker nodes in your cluster.
12+
. List the worker nodes in your cluster by running the following command:
1313
+
1414
[source,terminal]
1515
----
@@ -25,11 +25,11 @@ ci-ln-pwnll6b-f76d1-s8t9n-worker-b-dglj2
2525
ci-ln-pwnll6b-f76d1-s8t9n-worker-c-lldbm
2626
----
2727

28-
.. For the nodes you want to delay, add a custom label to the node:
28+
. For each node that you want to delay, add a custom label to the node by running the following command:
2929
+
3030
[source,terminal]
3131
----
32-
$ oc label node <node name> node-role.kubernetes.io/<custom-label>=
32+
$ oc label node <node_name> node-role.kubernetes.io/<custom_label>=
3333
----
3434
+
3535
For example:
@@ -46,7 +46,9 @@ $ oc label node ci-ln-0qv1yp2-f76d1-kl2tq-worker-a-j2ssz node-role.kubernetes.io
4646
node/ci-ln-gtrwm8t-f76d1-spbl7-worker-a-xk76k labeled
4747
----
4848

49-
.. Create the new MCP:
49+
. Create the new MCP:
50+
51+
.. Create an MCP YAML file:
5052
+
5153
[source,yaml]
5254
----
@@ -56,11 +58,11 @@ metadata:
5658
name: workerpool-canary <1>
5759
spec:
5860
machineConfigSelector:
59-
matchExpressions: <2>
61+
matchExpressions:
6062
- {
6163
key: machineconfiguration.openshift.io/role,
6264
operator: In,
63-
values: [worker,workerpool-canary]
65+
values: [worker,workerpool-canary] <2>
6466
}
6567
nodeSelector:
6668
matchLabels:
@@ -69,6 +71,8 @@ spec:
6971
<1> Specify a name for the MCP.
7072
<2> Specify the `worker` and custom MCP name.
7173
<3> Specify the custom label you added to the nodes that you want in this pool.
74+
75+
.. Create the `MachineConfigPool` object by running the following command:
7276
+
7377
[source,terminal]
7478
----
@@ -81,8 +85,8 @@ $ oc create -f <file_name>
8185
----
8286
machineconfigpool.machineconfiguration.openshift.io/workerpool-canary created
8387
----
84-
+
85-
.. View the list of MCPs in the cluster and their current state:
88+
89+
. View the list of MCPs in the cluster and their current state by running the following command:
8690
+
8791
[source,terminal]
8892
----
@@ -99,5 +103,3 @@ worker rendered-worker-87ba3dec1ad78cb6aecebf7fbb476a36
99103
----
100104
+
101105
The new machine config pool, `workerpool-canary`, is created and the number of nodes to which you added the custom label are shown in the machine counts. The worker MCP machine counts are reduced by the same number. It can take several minutes to update the machine counts. In this example, one node was moved from the `worker` MCP to the `workerpool-canary` MCP.
102-
103-

modules/update-using-custom-machine-config-pools-pause.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[id="update-using-custom-machine-config-pools-pause_{context}"]
66
= Pausing the machine config pools
77

8-
In this canary rollout update process, after you label the nodes that you do not want to update with the rest of your {product-title} cluster and create the machine config pools (MCPs), you pause those MCPs. Pausing an MCP prevents the Machine Config Operator (MCO) from updating the nodes associated with that MCP.
8+
After you create your custom machine config pools (MCPs), you then pause those MCPs. Pausing an MCP prevents the Machine Config Operator (MCO) from updating the nodes associated with that MCP.
99

10-
To pause an MCP:
10+
.Procedure
1111

12-
. Patch the MCP that you want paused:
12+
. Patch the MCP that you want paused by running the following command:
1313
+
1414
[source,terminal]
1515
----

modules/update-using-custom-machine-config-pools-unpause.adoc

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[id="update-using-custom-machine-config-pools-unpause_{context}"]
66
= Unpausing the machine config pools
77

8-
In this canary rollout update process, after the {product-title} update is complete, unpause your custom MCPs one-by-one. Unpausing an MCP allows the Machine Config Operator (MCO) to update the nodes associated with that MCP.
8+
After the {product-title} update is complete, unpause your custom machine config pools (MCP) one at a time. Unpausing an MCP allows the Machine Config Operator (MCO) to update the nodes associated with that MCP.
99

10-
To unpause an MCP:
10+
.Procedure
1111

1212
. Patch the MCP that you want to unpause:
1313
+
@@ -29,15 +29,23 @@ $ oc patch mcp/workerpool-canary --patch '{"spec":{"paused":false}}' --type=mer
2929
----
3030
machineconfigpool.machineconfiguration.openshift.io/workerpool-canary patched
3131
----
32+
33+
. Optional: Check the progress of the update by using one of the following options:
34+
35+
.. Check the progress from the web console by clicking *Administration* -> *Cluster settings*.
36+
37+
.. Check the progress by running the following command:
3238
+
33-
You can check the progress of the update by using the `oc get machineconfigpools` command.
39+
[source,terminal]
40+
----
41+
$ oc get machineconfigpools
42+
----
3443

3544
. Test your applications on the updated nodes to ensure that they are working as expected.
3645

37-
. Unpause any other paused MCPs one-by-one and verify that your applications work.
38-
39-
[id="update-using-custom-machine-config-pools-fail_{context}"]
40-
== In case of application failure
46+
. Repeat this process for any other paused MCPs, one at a time.
4147

48+
[NOTE]
49+
====
4250
In case of a failure, such as your applications not working on the updated nodes, you can cordon and drain the nodes in the pool, which moves the application pods to other nodes to help maintain the quality-of-service for the applications. This first MCP should be no larger than the excess capacity.
43-
51+
====

0 commit comments

Comments
 (0)