summaryrefslogtreecommitdiff
path: root/units
diff options
authorVic Liu <vic.liu@canonical.com>2021-07-02 17:50:07 +0800
committerVic Liu <vic.liu@canonical.com>2021-07-15 21:28:37 +0800
commita610500792657874537e8f1633cb746b891fa777 (patch)
tree64f7835f13dadd52b9ced492b3e37d5d22238700 /units
parent6689ffb78b2cbc45bb1da0c05ae05a3ee4d3dab1 (diff)
Change: Align the test for watchdog config on classic and core image
Watchdog implementation on both classic and core image no longer rely on watchdogd service since 20.04, with this change watchdog/systemd-config tests only systemd configuration on 20.04 and later series while keeping the original test for prior releases
Diffstat (limited to 'units')
-rw-r--r--units/watchdog/jobs.pxu27
1 files changed, 1 insertions, 26 deletions
diff --git a/units/watchdog/jobs.pxu b/units/watchdog/jobs.pxu
index 0e16f82..c2bd868 100644
--- a/units/watchdog/jobs.pxu
+++ b/units/watchdog/jobs.pxu
@@ -9,32 +9,7 @@ command: udev_resource.py -f WATCHDOG
id: watchdog/systemd-config
_summary: Check if the hardware watchdog is properly configured
template-engine: jinja2
-command:
- inbuilt=$(systemctl show -p RuntimeWatchdogUSec | awk -F= '{print $2}')
- external=$(systemctl is-active watchdog.service)
- {%- if __on_ubuntucore__ %}
- if [ "$inbuilt" == "0" ]; then
- echo "systemd watchdog should be enabled but reset timeout: $inbuilt"
- exit 1
- fi
- if [ "$external" == "active" ]; then
- echo "found unexpected active watchdog.service unit"
- exit 1
- fi
- echo "systemd watchdog enabled, reset timeout: $inbuilt"
- echo "watchdog.service is not active"
- {%- else %}
- if [ "$inbuilt" != "0" ]; then
- echo "systemd watchdog should not be enabled but reset timeout: $inbuilt"
- exit 1
- fi
- if [ "$external" != "active" ]; then
- echo "watchdog.service unit does not report as active"
- exit 1
- fi
- echo "systemd watchdog disabled"
- echo "watchdog.service active"
- {% endif -%}
+command: watchdog_config_test.py
category_id: com.canonical.plainbox::power-management
flags: simple
imports: from com.canonical.plainbox import manifest