1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-ovn-kubernetes-readiness-probes.adoc
2024-03-21 20:13:23 +00:00

66 lines
2.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/ovn_kubernetes_network_provider/ovn-kubernetes-troubleshooting-sources.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-ovn-kubernetes-readiness-probes_{context}"]
= Monitoring OVN-Kubernetes health by using readiness probes
The `ovnkube-control-plane` and `ovnkube-node` pods have containers configured with readiness probes.
.Prerequisites
* Access to the OpenShift CLI (`oc`).
* You have access to the cluster with `cluster-admin` privileges.
* You have installed `jq`.
.Procedure
. Review the details of the `ovnkube-node` readiness probe by running the following command:
+
[source,terminal]
----
$ oc get pods -n openshift-ovn-kubernetes -l app=ovnkube-node \
-o json | jq '.items[0].spec.containers[] | .name,.readinessProbe'
----
+
The readiness probe for the northbound and southbound database containers in the `ovnkube-node` pod checks for the health of the databases and the `ovnkube-controller` container.
+
The `ovnkube-controller` container in the `ovnkube-node` pod has a readiness probe to verify the presence of the OVN-Kubernetes CNI configuration file, the absence of which would indicate that the pod is not running or is not ready to accept requests to configure pods.
. Show all events including the probe failures, for the namespace by using the following command:
+
[source,terminal]
----
$ oc get events -n openshift-ovn-kubernetes
----
. Show the events for just a specific pod:
+
[source,terminal]
----
$ oc describe pod ovnkube-node-9lqfk -n openshift-ovn-kubernetes
----
. Show the messages and statuses from the cluster network operator:
+
[source,terminal]
----
$ oc get co/network -o json | jq '.status.conditions[]'
----
. Show the `ready` status of each container in `ovnkube-node` pods by running the following script:
+
[source,terminal]
----
$ for p in $(oc get pods --selector app=ovnkube-node -n openshift-ovn-kubernetes \
-o jsonpath='{range.items[*]}{" "}{.metadata.name}'); do echo === $p ===; \
oc get pods -n openshift-ovn-kubernetes $p -o json | jq '.status.containerStatuses[] | .name, .ready'; \
done
----
+
[NOTE]
====
The expectation is all container statuses are reporting as `true`. Failure of a readiness probe sets the status to `false`.
====