Skip to content

Commit 9255490

Browse files
authored
Merge pull request #46914 from ogradyp/TELCODOCS-28
TELCODOCS-28: New status items, drainProgress and elapsedTime, added
2 parents e8a40b5 + 6e6f1af commit 9255490

10 files changed

+115
-28
lines changed

modules/eco-about-node-maintenance-standalone.adoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
[id="eco-about-node-maintenance-operator_{context}"]
66
= About the Node Maintenance Operator
77

8-
You can place nodes into maintenance mode using the `oc adm` utility, or using `NodeMaintenance` custom resources (CRs).
9-
108
The Node Maintenance Operator watches for new or deleted `NodeMaintenance` CRs. When a new `NodeMaintenance` CR is detected, no new workloads are scheduled and the node is cordoned off from the rest of the cluster. All pods that can be evicted are evicted from the node. When a `NodeMaintenance` CR is deleted, the node that is referenced in the CR is made available for new workloads.
119

1210
[NOTE]

modules/eco-checking_status_of_node_maintenance_cr_tasks.adoc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,16 @@ items:
3636
nodeName: node-1.example.com
3737
reason: Node maintenance
3838
status:
39-
evictionPods: 3 <1>
40-
lastError: "Last failure message" <2>
39+
drainProgress: 100 <1>
40+
evictionPods: 3 <2>
41+
lastError: "Last failure message" <3>
42+
lastUpdate: "2022-06-23T11:43:18Z" <4>
4143
phase: Succeeded
42-
totalpods: 5 <3>
44+
totalpods: 5 <5>
4345
...
4446
----
45-
<1> The number of pods scheduled for eviction.
46-
<2> The latest eviction error, if any.
47-
<3> The total number of pods before the node entered maintenance mode.
47+
<1> The percentage completion of draining the node.
48+
<2> The number of pods scheduled for eviction.
49+
<3> The latest eviction error, if any.
50+
<4> The last time the status was updated.
51+
<5> The total number of pods before the node entered maintenance mode.

modules/eco-node-maintenance-operator-installation-web-console.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ To confirm that the installation is successful:
2929
If the Operator is not installed successfully:
3030

3131
. Navigate to the *Operators* -> *Installed Operators* page and inspect the `Status` column for any errors or failures.
32-
. Navigate to the *Workloads* -> *Pods* page and check the logs in any pods in the `openshift-operators` project that are reporting issues.
32+
. Navigate to the *Operators* -> *Installed Operators* -> *Node Maintenance Operator* -> *Details* page, and inspect the `Conditions` section for errors before pod creation.
33+
. Navigate to the *Workloads* -> *Pods* page, search for the `Node Maintenance Operator` pod in the installed namespace, and check the logs in the `Logs` tab.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Module included in the following assemblies:
2+
//
3+
//nodes/nodes/eco-node-maintenance-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="eco-resuming-node-maintenance-actions-web-console_{context}"]
7+
= Resuming a bare-metal node from maintenance mode
8+
Resume a bare-metal node from maintenance mode using the Options menu {kebab} found on each node in the *Compute* -> *Nodes* list, or using the *Actions* control of the *Node Details* screen.
9+
10+
.Procedure
11+
12+
. From the *Administrator* perspective of the web console, click *Compute* -> *Nodes*.
13+
. You can resume the node from this screen, which makes it easier to perform actions on multiple nodes, or from the *Node Details* screen, where you can view comprehensive details of the selected node:
14+
** Click the Options menu {kebab} at the end of the node and select
15+
*Stop Maintenance*.
16+
** Click the node name to open the *Node Details* screen and click
17+
*Actions* -> *Stop Maintenance*.
18+
. Click *Stop Maintenance* in the confirmation window.
19+
20+
The node becomes schedulable. If it had virtual machine instances that were running on the node prior to maintenance, then they will not automatically migrate back to this node.
21+
22+
.Verification
23+
24+
* Navigate to the *Compute* -> *Nodes* page and verify that the corresponding node has a status of `Ready`.

modules/eco-resuming-node-maintenance-cr-cli.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,24 @@ $ oc delete -f nodemaintenance-cr.yaml
2828
----
2929
nodemaintenance.nodemaintenance.medik8s.io "maintenance-example" deleted
3030
----
31+
32+
.Verification
33+
34+
. Check the progress of the maintenance task by running the following command:
35+
+
36+
[source,terminal]
37+
----
38+
$ oc describe node <node-name>
39+
----
40+
+
41+
where `<node-name>` is the name of your node; for example, `node-1.example.com`
42+
43+
. Check the example output:
44+
+
45+
[source,terminal]
46+
----
47+
Events:
48+
Type Reason Age From Message
49+
---- ------ ---- ---- -------
50+
Normal NodeSchedulable 2m kubelet Node node-1.example.com status is now: NodeSchedulable
51+
----

modules/eco-resuming-node-maintenance-cr-web-console.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
= Resuming a node from maintenance mode by using the web console
88

99
To resume a node from maintenance mode, you can delete a `NodeMaintenance` custom resource (CR) by using the web console.
10-
10+
1111
.Prerequisites
1212

1313
* Log in as a user with `cluster-admin` privileges.
@@ -27,4 +27,4 @@ To resume a node from maintenance mode, you can delete a `NodeMaintenance` custo
2727

2828
. In the {product-title} console, click *Compute → Nodes*.
2929

30-
. Inspect the `Status` column of the node for which you deleted the `NodeMaintenance` CR and verify that its status is `Ready`.
30+
. Inspect the `Status` column of the node for which you deleted the `NodeMaintenance` CR and verify that its status is `Ready`.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Module included in the following assemblies:
2+
//
3+
//nodes/nodes/eco-node-maintenance-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="eco-setting-node-maintenance-actions-web-console_{context}"]
7+
= Setting a bare-metal node to maintenance mode
8+
Set a bare-metal node to maintenance mode using the Options menu {kebab} found on each node in the *Compute* -> *Nodes* list, or using the *Actions* control of the *Node Details* screen.
9+
10+
.Procedure
11+
12+
. From the *Administrator* perspective of the web console, click *Compute* -> *Nodes*.
13+
. You can set the node to maintenance from this screen, which makes it easier to perform actions on multiple nodes, or from the *Node Details* screen, where you can view comprehensive details of the selected node:
14+
** Click the Options menu {kebab} at the end of the node and select *Start Maintenance*.
15+
** Click the node name to open the *Node Details* screen and click
16+
*Actions* -> *Start Maintenance*.
17+
. Click *Start Maintenance* in the confirmation window.
18+
19+
The node is no longer schedulable. If it had virtual machines with the `LiveMigration` eviction strategy, then it will live migrate them. All other pods and virtual machines on the node are deleted and recreated on another node.
20+
21+
.Verification
22+
23+
* Navigate to the *Compute* -> *Nodes* page and verify that the corresponding node has a status of `Under maintenance`.

modules/eco-setting-node-maintenance-cr-cli.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,18 @@ spec:
3838
$ oc apply -f nodemaintenance-cr.yaml
3939
----
4040

41-
. Check the progress of the maintenance task by running the following command, replacing `<node-name>` with the name of your node; for example, `node-1.example.com`:
41+
.Verification
42+
43+
. Check the progress of the maintenance task by running the following command:
4244
+
4345
[source,terminal]
4446
----
45-
$ oc describe node node-1.example.com
47+
$ oc describe node <node-name>
4648
----
4749
+
48-
.Example output
50+
where `<node-name>` is the name of your node; for example, `node-1.example.com`
51+
52+
. Check the example output:
4953
+
5054
[source,terminal]
5155
----

modules/eco-setting-node-maintenance-cr-web-console.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ To set a node to maintenance mode, you can create a `NodeMaintenance` custom res
2727

2828
.Verification
2929

30-
In the *Node Maintenance* tab, inspect the `Status` column and verify that its status is `Succeeded`.
30+
In the *Node Maintenance* tab, inspect the `Status` column and verify that its status is `Succeeded`.

nodes/nodes/eco-node-maintenance-operator.adoc

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
You can use the Node Maintenance Operator to place nodes in maintenance mode. This is a standalone version of the Node Maintenance Operator that is independent of {VirtProductName} installation.
10-
11-
[NOTE]
12-
====
13-
If you have installed {VirtProductName}, you must use the Node Maintenance Operator that is bundled with it.
14-
====
9+
You can use the Node Maintenance Operator to place nodes in maintenance mode by using the `oc adm` utility or `NodeMaintenance` custom resources (CRs).
1510

1611
include::modules/eco-about-node-maintenance-standalone.adoc[leveloffset=+1]
1712

18-
include::modules/eco-maintaining-bare-metal-nodes.adoc[leveloffset=+1]
19-
2013
[id="installing-standalone-nmo"]
2114
== Installing the Node Maintenance Operator
2215
You can install the Node Maintenance Operator using the web console or the OpenShift CLI (`oc`).
2316

17+
[NOTE]
18+
====
19+
If {VirtProductName} version 4.10 or less is installed in your cluster, it includes an outdated version of the Node Maintenance Operator version.
20+
====
21+
2422
include::modules/eco-node-maintenance-operator-installation-web-console.adoc[leveloffset=+2]
2523

2624
include::modules/eco-node-maintenance-operator-installation-cli.adoc[leveloffset=+2]
@@ -29,23 +27,37 @@ The Node Maintenance Operator is supported in a restricted network environment.
2927

3028
[id="setting-node-in-maintenance-mode"]
3129
== Setting a node to maintenance mode
32-
You can place a node into maintenance from the web console or in the CLI by using a `NodeMaintenance` CR.
30+
You can place a node into maintenance mode from the web console or from the CLI by using a `NodeMaintenance` CR.
3331

3432
include::modules/eco-setting-node-maintenance-cr-web-console.adoc[leveloffset=+2]
3533

3634
include::modules/eco-setting-node-maintenance-cr-cli.adoc[leveloffset=+2]
3735

38-
include::modules/eco-checking_status_of_node_maintenance_cr_tasks.adoc[leveloffset=+3]
36+
include::modules/eco-checking_status_of_node_maintenance_cr_tasks.adoc[leveloffset=+2]
3937

4038
[id="resuming-node-from-maintenance-mode"]
4139
== Resuming a node from maintenance mode
42-
43-
You can resume a node from maintenance mode from the CLI or by using a `NodeMaintenance` CR. Resuming a node brings it out of maintenance mode and makes it schedulable again.
40+
You can resume a node from maintenance mode from the web console or from the CLI by using a `NodeMaintenance` CR. Resuming a node brings it out of maintenance mode and makes it schedulable again.
4441

4542
include::modules/eco-resuming-node-maintenance-cr-web-console.adoc[leveloffset=+2]
4643

4744
include::modules/eco-resuming-node-maintenance-cr-cli.adoc[leveloffset=+2]
4845

46+
[id="working-with-bare-metal-nodes"]
47+
== Working with bare-metal nodes
48+
For clusters with bare-metal nodes, you can place a node into maintenance mode, and resume a node from maintenance mode, by using the web console *Actions* control.
49+
50+
[NOTE]
51+
====
52+
Clusters with bare-metal nodes can also place a node into maintenance mode, and resume a node from maintenance mode, by using the web console and CLI, as outlined. These methods, by using the web console *Actions* control, are applicable to bare-metal clusters only.
53+
====
54+
55+
include::modules/eco-maintaining-bare-metal-nodes.adoc[leveloffset=+2]
56+
57+
include::modules/eco-setting-node-maintenance-actions-web-console.adoc[leveloffset=+2]
58+
59+
include::modules/eco-resuming-node-maintenance-actions-web-console.adoc[leveloffset=+2]
60+
4961
[id="gather-data-nmo"]
5062
== Gathering data about the Node Maintenance Operator
5163
To collect debugging information about the Node Maintenance Operator, use the `must-gather` tool. For information about the `must-gather` image for the Node Maintenance Operator, see xref:../../support/gathering-cluster-data.adoc#gathering-data-specific-features_gathering-cluster-data[Gathering data about specific features].
@@ -55,4 +67,4 @@ To collect debugging information about the Node Maintenance Operator, use the `m
5567
== Additional resources
5668
* xref:../../support/gathering-cluster-data.adoc#gathering-cluster-data[Gathering data about your cluster]
5769
* xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-evacuating_nodes-nodes-working[Understanding how to evacuate pods on nodes]
58-
* xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-marking_nodes-nodes-working[Understanding how to mark nodes as unschedulable or schedulable]
70+
* xref:../../nodes/nodes/nodes-nodes-working.adoc#nodes-nodes-working-marking_nodes-nodes-working[Understanding how to mark nodes as unschedulable or schedulable]

0 commit comments

Comments
 (0)