Added OBSW Watchdog #67
No reviewers
Labels
No Label
OPS TODO
api change
breaking api change
bug
documentation
duplicate
feature
help wanted
invalid
question
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: eive/eive-obsw#67
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "mueller/added-watchdog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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