Skip to content

Commit 83a7df0

Browse files
authored
Merge pull request #53249 from sjhala-ccs/cnv-18399
CNV-18399: Guest agent ping probe
2 parents f8bffcb + 66b51d0 commit 83a7df0

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

modules/virt-about-readiness-liveness-probes.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ You can configure readiness and liveness probes by setting the `spec.readinessPr
1818
HTTP GET:: The probe determines the health of the VMI by using a web hook. The test is successful if the HTTP response code is between 200 and 399. You can use an HTTP GET test with applications that return HTTP status codes when they are completely initialized.
1919

2020
TCP socket:: The probe attempts to open a socket to the VMI. The VMI is only considered healthy if the probe can establish a connection. You can use a TCP socket test with applications that do not start listening until initialization is complete.
21+
22+
Guest agent ping:: The probe uses the `guest-ping` command to determine if the QEMU guest agent is running on the virtual machine.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * virt/logging_events_monitoring/virt-monitoring-vm-health.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="virt-define-guest-agent-ping-probe_{context}"]
7+
8+
= Defining a guest agent ping probe
9+
10+
Define a guest agent ping probe by setting the `spec.readinessProbe.guestAgentPing` field of the virtual machine instance (VMI) configuration.
11+
12+
:FeatureName: The guest agent ping probe
13+
include::snippets/technology-preview.adoc[]
14+
15+
.Prerequisites
16+
17+
* The QEMU guest agent must be installed and enabled on the virtual machine.
18+
19+
.Procedure
20+
21+
. Include details of the guest agent ping probe in the VMI configuration file. For example:
22+
+
23+
24+
.Sample guest agent ping probe
25+
[source,yaml]
26+
----
27+
# ...
28+
spec:
29+
readinessProbe:
30+
guestAgentPing: {} <1>
31+
initialDelaySeconds: 120 <2>
32+
periodSeconds: 20 <3>
33+
timeoutSeconds: 10 <4>
34+
failureThreshold: 3 <5>
35+
successThreshold: 3 <6>
36+
# ...
37+
----
38+
<1> The guest agent ping probe to connect to the VMI.
39+
<2> Optional: The time, in seconds, after the VMI starts before the guest agent probe is initiated.
40+
<3> Optional: The delay, in seconds, between performing probes. The default delay is 10 seconds. This value must be greater than `timeoutSeconds`.
41+
<4> Optional: The number of seconds of inactivity after which the probe times out and the VMI is assumed to have failed. The default value is 1. This value must be lower than `periodSeconds`.
42+
<5> Optional: The number of times that the probe is allowed to fail. The default is 3. After the specified number of attempts, the pod is marked `Unready`.
43+
<6> Optional: The number of times that the probe must report success, after a failure, to be considered successful. The default is 1.
44+
45+
. Create the VMI by running the following command:
46+
+
47+
[source,terminal]
48+
----
49+
$ oc create -f <file_name>.yaml
50+
----

virt/logging_events_monitoring/virt-monitoring-vm-health.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ toc::[]
99
A virtual machine instance (VMI) can become unhealthy due to transient issues such as connectivity loss, deadlocks, or problems with external dependencies. A health check periodically performs diagnostics on a VMI by using any combination of the readiness and liveness probes.
1010

1111
include::modules/virt-about-readiness-liveness-probes.adoc[leveloffset=+1]
12+
1213
include::modules/virt-define-http-readiness-probe.adoc[leveloffset=+1]
14+
1315
include::modules/virt-define-tcp-readiness-probe.adoc[leveloffset=+1]
16+
1417
include::modules/virt-define-http-liveness-probe.adoc[leveloffset=+1]
18+
19+
include::modules/virt-define-guest-agent-ping-probe.adoc[leveloffset=+1]
20+
1521
include::modules/virt-template-vm-probe-config.adoc[leveloffset=+1]
1622

23+
1724
[id="additional-resources_monitoring-vm-health"]
1825
[role="_additional-resources"]
1926
== Additional resources

0 commit comments

Comments
 (0)