1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/checking-mco-node-status.adoc

116 lines
6.6 KiB
Plaintext

// Module included in the following assemblies:
//
// * post_installation_configuration/machine-configuration-tasks.adoc
:_mod-docs-content-type: PROCEDURE
[id="checking-mco-node-status_{context}"]
= Checking machine config node status
During updates you might want to monitor the progress of individual nodes in case issues arise and you need to troubleshoot a node.
To see the status of the Machine Config Operator (MCO) updates to your cluster, use the following `oc` commands:
:FeatureName: Improved MCO state reporting
include::snippets/technology-preview.adoc[]
.Procedure
. Get a summary of update statuses for all nodes in all machine config pools by running the following command:
+
[source,terminal]
----
$ oc get machineconfignodes
----
+
.Example output
[source,text]
----
NAME UPDATED UPDATEPREPARED UPDATEEXECUTED UPDATEPOSTACTIONCOMPLETED UPDATECOMPLETED RESUMED
ip-10-0-12-194.ec2.internal True False False False False False
ip-10-0-17-102.ec2.internal False True False False False False
ip-10-0-2-232.ec2.internal False False True False False False
ip-10-0-59-251.ec2.internal False False False True False False
ip-10-0-59-56.ec2.internal False False False False True True
ip-10-0-6-214.ec2.internal False False Unknown False False False
----
+
where:
+
UPDATED:: The `True` status indicates that the MCO has applied the current machine config to that particular node. The `False` status indicates that the node is currently updating. The `Unknown` status means the operation is processing.
UPDATEPREPARED:: The `False` status indicates that the MCO has not started reconciling the new machine configs to be distributed. The `True` status indicates that the MCO has completed this phase of the update. The `Unknown` status means the operation is processing.
UPDATEEXECUTED:: The `False` status indicates that the MCO has not started cordoning and draining the node. It also indicates that the disk state and operating system have not started updating. The `True` status indicates that the MCO has completed this phase of the update. The `Unknown` status means the operation is processing.
UPDATEPOSTACTIONCOMPLETED:: The `False` status indicates that the MCO has not started rebooting the node or closing the daemon. The `True` status indicates that the MCO has completed reboot and updating the node status. The `Unknown` status indicates either that an error has occurred during the update process at this phase, or that the MCO is currently applying the update.
UPDATECOMPLETED:: The `False` status indicates that the MCO has not started uncordoning the node and updating the node state and metrics. The `True` status indicates that the MCO has finished updating the node state and available metrics.
RESUMED:: The `False` status indicates that the MCO has not started the config drift monitor. The `True` status indicates that the node has resumed operation. The `Unknown` status means the operation is processing.
+
[NOTE]
====
Within the primary phases previously described, you can have secondary phases which you can use to see the update progression in more detail. You can get more information that includes secondary phases of updates by using the `-o wide` option of the preceding command. This provides the additional `UPDATECOMPATIBLE`, `UPDATEFILESANDOS`, `DRAINEDNODE`, `CORDONEDNODE`, `REBOOTNODE`, `RELOADEDCRIO` and `UNCORDONED` columns. These secondary phases do not always occur and depend on the type of update you want to apply.
====
. Check the update status of nodes in a specific machine config pool by running the following command:
+
[source,terminal]
----
$ oc get machineconfignodes $(oc get machineconfignodes -o json | jq -r '.items[]|select(.spec.pool.name=="<pool_name>")|.metadata.name') <1>
----
<1> The name of the pool is the `MachineConfigPool` object name.
+
.Example output
[source,text]
----
NAME UPDATED UPDATEPREPARED UPDATEEXECUTED UPDATEPOSTACTIONCOMPLETE UPDATECOMPLETE RESUMED
ip-10-0-48-226.ec2.internal True False False False False False
ip-10-0-5-241.ec2.internal True False False False False False
ip-10-0-74-108.ec2.internal True False False False False False
----
. Check the update status of an individual node by running the following command:
+
[source,terminal]
----
$ oc describe machineconfignode/<node_name> <1>
----
<1> The name of the node is the `MachineConfigNode` object name.
+
.Example output
[source,text]
----
Name: <node_name>
Namespace:
Labels: <none>
Annotations: <none>
API Version: machineconfiguration.openshift.io/v1alpha1
Kind: MachineConfigNode
Metadata:
Creation Timestamp: 2023-10-17T13:08:58Z
Generation: 1
Resource Version: 49443
UID: 4bd758ab-2187-413c-ac42-882e61761b1d
Spec:
Node Ref:
Name: <node_name>
Pool:
Name: master
ConfigVersion:
Desired: rendered-worker-823ff8dc2b33bf444709ed7cd2b9855b <1>
Status:
Conditions:
Last Transition Time: 2023-10-17T13:09:02Z
Message: Node has completed update to config rendered-master-cf99e619747ab19165f11e3546c71f1e
Reason: NodeUpgradeComplete
Status: True
Type: Updated
Last Transition Time: 2023-10-17T13:09:02Z
Message: This node has not yet entered the UpdatePreparing phase
Reason: NotYetOccured
Status: False
Config Version:
Current: rendered-worker-823ff8dc2b33bf444709ed7cd2b9855b
Desired: rendered-worker-823ff8dc2b33bf444709ed7cd2b9855b <2>
Health: Healthy
Most Recent Error:
Observed Generation: 3
----
<1> The desired configuration specified in the `spec.configversion.desired` field updates immediately when a new configuration is detected on the node.
<2> The desired configuration specified in the `status.configversion.desired` field updates only when the new configuration is validated by the Machine Config Daemon (MCD). The MCD performs validation by checking the current phase of the update. If the update successfully passes the `UPDATEPREPARED` phase, then the status adds the new configuration.