Skip to content

Commit

Permalink
squash: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
happz committed Mar 8, 2024
1 parent d3400f8 commit 410efea
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ to TPM 2.0 for now, the future release of `testcloud`__, the
library behing ``virtual`` plugin, will extend the support to more
versions.

A new :ref:`watchdog test check<plugins/test-checks/watchdog>` has been
added. It monitors a guest running the test with either ping or SSH
connections, and may force reboot of the guest when it becomes
unresponsive. This is the first step towards helping tests handle kernel
panics and similar situations.

__ https://pagure.io/testcloud/


Expand Down
1 change: 1 addition & 0 deletions tests/test/check/main.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tier: 2
test: ./test-avc.sh
tag+:
- provision-only
- provision-local
- provision-virtual

/watchdog:
Expand Down
19 changes: 17 additions & 2 deletions tmt/checks/watchdog.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class Watchdog(CheckPlugin[WatchdogCheck]):
* "SSH ping" tries to establish SSH connection,
* "reboot" action issues a hard reboot of the guest.
Each probe has a "budged" of allowed failures, and when it runs out,
Each probe has a "budget" of allowed failures, and when it runs out,
the action is taken. A successfull probe replenishes its budget to
the original level.
Expand All @@ -375,10 +375,25 @@ class Watchdog(CheckPlugin[WatchdogCheck]):
.. code-block:: yaml
check:
- name: watchdog
- how: watchdog
ping: true
reboot: true
.. code-block:: yaml
check:
- how: watch
# Use only SSH ping.
ping: false
ssh-ping: true
# Try every 5 minutes, allow 7 failed attempts, and reboot
# the guest when we run out of attempts.
interval: 300
reboot: true
ssh-ping-threshold: 7
.. versionadded:: 1.32
"""

Expand Down

0 comments on commit 410efea

Please sign in to comment.