$ oc get cgu <cgu_name> -n <namespace> -o yaml
If a cluster update gets stuck, fails, or results in degraded cluster Operators, use the following diagnostic procedures to identify the root cause and take corrective action.
If a ClusterGroupUpgrade custom resource (CR) is stuck in the Preparing state, the issue is typically related to policy compliance, cluster readiness, or blocking custom resources.
You have a ClusterGroupUpgrade CR that is stuck in Preparing state.
You have access to the Red Hat Advanced Cluster Management (RHACM) hub cluster with cluster-admin privileges.
Check the ClusterGroupUpgrade status by running the following command:
$ oc get cgu <cgu_name> -n <namespace> -o yaml
Look for error messages in the status.conditions section.
Common causes include managed policies that do not exist or are not bound to target clusters, target clusters that are not in a ready state, and blocking custom resources that are not ready.
Check policy compliance in RHACM by running the following command:
$ oc get policy <policy_name> -n <namespace>
Check policy details for noncompliant policies by running the following command:
$ oc describe policy <policy_name> -n <namespace>
Resolve policy compliance issues before the ClusterGroupUpgrade CR can proceed.
If a ClusterGroupUpgrade custom resource (CR) completes but some clusters show a failed status, investigate the failed clusters individually to identify the root cause.
You have a ClusterGroupUpgrade CR that shows failed clusters.
You have access to the Red Hat Advanced Cluster Management (RHACM) hub cluster with cluster-admin privileges.
Check detailed cluster status in the ClusterGroupUpgrade CR by running the following command:
$ oc get cgu <cgu_name> -n <namespace> -o jsonpath='{.status.clusters}'
The following example shows the output:
{
"spoke1": "complete",
"spoke2": "failed",
"spoke3": "inprogress"
}
Check TALM logs for errors related to the failed clusters by running the following command:
$ oc logs -n openshift-operators deployment/cluster-group-upgrades-controller-manager
Check policy violation events on the failed cluster by running the following command:
$ oc --context=<failed_cluster> get events -A --sort-by='.lastTimestamp' | tail -20
If a cluster Operator becomes degraded during an update, identify the affected Operator and investigate the root cause.
Common Operators that degrade during updates include authentication, console, monitoring, and network.
You have a cluster update in progress with one or more degraded Operators.
You have access to the target cluster with cluster-admin privileges.
Identify degraded Operators by running the following command:
$ oc get co | grep -v "True.*False.*False"
The following example shows the output:
NAME VERSION AVAILABLE PROGRESSING DEGRADED SINCE MESSAGE
authentication 4.20.0 True False True 5m APIServerDeploymentDegraded: ...
Check Operator details by running the following command:
$ oc describe co authentication
Look for error messages in the status.conditions section of the output.
Check Operator pod logs by running the following command:
$ oc logs -n openshift-authentication deployment/oauth-openshift
If the cluster version shows a "Working towards" message for an extended period, identify which Operators are blocking the update from completing. Updates typically complete within 90 to 180 minutes.
You have a cluster update that appears stuck in the "Working towards" state.
You have access to the target cluster with cluster-admin privileges.
Check ClusterVersion status by running the following command:
$ oc get clusterversion -o yaml
Look for the status.conditions section to identify blocking resources.
Check which Operators are still progressing by running the following command:
$ oc get co | grep "True"
Any Operator showing PROGRESSING=True is still updating.
Check ClusterVersion history by running the following command:
$ oc get clusterversion -o jsonpath='{.status.history}'
A missing or stalled history entry indicates the update has timed out.
If worker nodes show NotReady status during an update, common causes include disk pressure, memory pressure, network connectivity issues, and PID pressure.
You have worker nodes showing NotReady status during a cluster update.
You have access to the target cluster with cluster-admin privileges.
Identify NotReady nodes by running the following command:
$ oc get nodes | grep NotReady
Check node conditions by running the following command:
$ oc describe node <node_name> | grep -A 10 Conditions
Check kubelet logs by running the following command:
$ oc debug node/<node_name> -- chroot /host journalctl -u kubelet -n 100
If worker node updates are stuck, the issue is typically related to pod disruption budgets, machine config daemon failures, or node reboot failures.
You have a worker node update that is not progressing.
You have access to the target cluster with cluster-admin privileges.
Check the MachineConfigPool resource status by running the following command:
$ oc get mcp worker -o yaml
Look for degraded machine configs in the status.
Check pod disruption budgets by running the following command:
$ oc get pdb -A
If a pod disruption budget (PDB) shows ALLOWED DISRUPTIONS of 0, adjust the PDB configuration.
Check machine-config-daemon logs on the stuck node by running the following command:
$ oc logs -n openshift-machine-config-operator <machine_config_daemon_pod>
If etcd members become unhealthy during a control plane update, identify the affected members and investigate the root cause before proceeding.
You have a control plane update with suspected etcd issues.
You have access to the target cluster with cluster-admin privileges.
Check etcd cluster health by running the following command:
$ oc get etcd -o yaml
Look for the EtcdMembersAvailable condition in the output.
Check etcd pod status by running the following command:
$ oc get pods -n openshift-etcd -l app=etcd
All etcd pods must be running.
View etcd member status by running the following command:
$ oc rsh -n openshift-etcd <etcd_pod> etcdctl member list -w table
Monitor etcd logs for errors by running the following command:
$ oc logs -n openshift-etcd <etcd_pod> etcd
If image pull failures occur during an update, common causes include registry connectivity issues, images not mirrored to a disconnected registry, and image pull authentication failures.
You have image pull failures during a cluster update.
You have access to the target cluster with cluster-admin privileges.
Check image pull status on nodes by running the following command:
$ oc get events -A --field-selector reason=Failed --sort-by='.lastTimestamp' | grep -i image
For disconnected environments, verify image mirroring by running the following command:
$ oc get imagedigestmirrorset
|
In OKD 4.13 and earlier, image mirroring was configured with |
Test image pull from a node by running the following command:
$ oc debug node/<node_name> -- chroot /host podman pull <image_url>
If TALM reports that the update timeout was exceeded, investigate cluster resource utilization, image pull speed, and network latency.
You have a ClusterGroupUpgrade custom resource (CR) that has timed out.
You have access to the target cluster with cluster-admin privileges.
Check cluster resource utilization by running the following command:
$ oc adm top nodes
High CPU or memory usage can slow updates.
Check for slow image pulls by running the following command:
$ oc get events -A --sort-by='.lastTimestamp' | grep -i "pull"
Slow image pulls can indicate network latency between nodes and registries.
Increase the ClusterGroupUpgrade CR timeout by running the following command if the cluster is healthy but updating slowly:
$ oc patch cgu <cgu_name> -n <namespace> --type merge -p '{"spec":{"remediationStrategy":{"timeout":240}}}'
During the update, TALM verifies the status of ClusterVersion for the OKD update and Subscription for OLM Operators.
If errors occur during those updates, the status does not change to the expected value and the policies do not become compliant.
TALM holds at that point waiting for compliance.
If you are monitoring the update, you can fix the issue on the target cluster and the update continues automatically when the policy becomes compliant.
ClusterGroupUpgrade custom resource (CR) has timed outDelete the timed-out CR by running the following command:
$ oc delete cgu <timed_out_cgu_name> -n <namespace>
All policies revert to inform mode, leaving the cluster at the point where the issue occurred.
Fix the issue that caused the timeout, then re-create the ClusterGroupUpgrade CR to resume the update by running the following command:
$ oc apply -f <cgu_cr_filename>.yaml
Delete the ClusterGroupUpgrade CR to revert all policies to inform mode by running the following command:
$ oc delete cgu <cgu_name> -n <namespace>
After the policies revert to inform mode, they do not enforce changes on the cluster.
Fix the issue, then re-create the ClusterGroupUpgrade CR to resume the update.
If you cannot resolve the update issue, collect diagnostic information and contact Red Hat support for assistance.
You have a cluster update issue that you cannot resolve.
You have access to the target cluster and the Red Hat Advanced Cluster Management (RHACM) hub cluster with cluster-admin privileges.
Collect must-gather data by running the following command:
$ oc adm must-gather
Collect RHACM must-gather data for TALM-specific issues by running the following command:
$ oc adm must-gather --image=registry.redhat.io/rhacm2/must-gather-rhel8
Collect ClusterVersion history by running the following command:
$ oc get clusterversion -o jsonpath='{.status.history}' > clusterversion-history.json
Collect ClusterGroupUpgrade status by running the following command:
$ oc get cgu <cgu_name> -n <namespace> -o yaml > cgu-status.yaml