Added OBSW Watchdog #67

Merged
meierj merged 20 commits from mueller/added-watchdog into develop 2021-07-31 08:51:56 +02:00
Owner

This is a software watchdog implementation which traces whether the EIVE OBSW is running by using the Linux FIFO (named pipe) functionality.

The watchdog will create a pipe at /tmp/watchdog-pipe which can be used both by the watchdog and the EIVE OBSW. The watchdog will only read from this pipe while the OBSW will only write to this pipe.

The watchdog checks for basic ASCII commands as a first basic feature set. The most important functionality is that the watchdog can detect if a timeout has happened. This can be beause the OBSW is hanging (or at least the CoreController thread) or there is simply no OBSW running on the system. It does so by checking whether the FIFO is regulary written to, which means the EIVE OBSW is alive.

If the EIVE OBSW is alive, a special file called /tmp/obsw-running will be created. This file can be used by any other software component to query whether the EIVE OBSW is running. The EIVE OBSW itself can be configured to check whether this file exists, which prevents two EIVE OBSW instances running on the Q7S at once.

If a timeout occurs or the OBSW hangs up(e.g. debugging session cancelled), this special file will be deleted by the watchdog as well.
The watchdog and its configuration will be directly integrated into this repostory, which makes adaptions easy. It might be worth thinking about whether the watchdog is allowed to reboot the system.

This is actually an excellent chance to introduce Rust code on the Q7S. Might look into this soon. For now, I will introduce a systemd service as well to start the watchdog at startup.

I also added a feature to make the EIVE OBSW binary name unique, by adding $ENV{USERNAME} to the binary name. This prevents overwriting a currently running *.elf file when debugging.

IMPORTANT: The new obsw binary name is eive-obsw-$ENV{USERNAME} now. Update tcf agent remote debugging configurations accordingly

This is a software watchdog implementation which traces whether the EIVE OBSW is running by using the Linux FIFO (named pipe) functionality. The watchdog will create a pipe at `/tmp/watchdog-pipe` which can be used both by the watchdog and the EIVE OBSW. The watchdog will only read from this pipe while the OBSW will only write to this pipe. The watchdog checks for basic ASCII commands as a first basic feature set. The most important functionality is that the watchdog can detect if a timeout has happened. This can be beause the OBSW is hanging (or at least the `CoreController` thread) or there is simply no OBSW running on the system. It does so by checking whether the FIFO is regulary written to, which means the EIVE OBSW is alive. If the EIVE OBSW is alive, a special file called `/tmp/obsw-running` will be created. This file can be used by any other software component to query whether the EIVE OBSW is running. The EIVE OBSW itself can be configured to check whether this file exists, which prevents two EIVE OBSW instances running on the Q7S at once. If a timeout occurs or the OBSW hangs up(e.g. debugging session cancelled), this special file will be deleted by the watchdog as well. The watchdog and its configuration will be directly integrated into this repostory, which makes adaptions easy. It might be worth thinking about whether the watchdog is allowed to reboot the system. This is actually an excellent chance to introduce Rust code on the Q7S. Might look into this soon. For now, I will introduce a systemd service as well to start the watchdog at startup. I also added a feature to make the EIVE OBSW binary name unique, by adding `$ENV{USERNAME}` to the binary name. This prevents overwriting a currently running `*.elf` file when debugging. IMPORTANT: The new obsw binary name is `eive-obsw-$ENV{USERNAME}` now. Update tcf agent remote debugging configurations accordingly
muellerr added the
feature
label 2021-07-29 17:29:19 +02:00
muellerr added 12 commits 2021-07-29 17:29:20 +02:00
muellerr added 1 commit 2021-07-29 18:10:16 +02:00
muellerr added 1 commit 2021-07-29 18:10:28 +02:00
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details
bc1d236a85
Merge branch 'develop' into mueller/added-watchdog
muellerr added 2 commits 2021-07-29 18:17:30 +02:00
muellerr added 1 commit 2021-07-29 18:21:15 +02:00
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details
df971d4ec5
dont need csp lib in watchdog
muellerr added 1 commit 2021-07-29 18:32:09 +02:00
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details
940d4965bc
small corrections
muellerr added 1 commit 2021-07-29 18:33:22 +02:00
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details
d8acf94a02
more corrections
muellerr added 1 commit 2021-07-29 19:43:16 +02:00
EIVE/eive-obsw/pipeline/pr-develop This commit looks good Details
EIVE/eive-obsw/pipeline/head Build queued... Details
8c3d25f62d
updated README
muellerr requested review from meierj 2021-07-29 19:43:21 +02:00
muellerr added this to the v1.6.0 milestone 2021-07-29 19:44:42 +02:00
meierj approved these changes 2021-07-31 08:51:39 +02:00
meierj merged commit 298a87d349 into develop 2021-07-31 08:51:56 +02:00
meierj deleted branch mueller/added-watchdog 2021-07-31 08:52:04 +02:00
Sign in to join this conversation.
No description provided.