MDSLab / s4t-lightning-rod

Implementation of the Lightning-rod, the Stack4Things node-side probe (this version works with the standalone version of IoTronic)
http://stack4things.unime.it/
Apache License 2.0
3 stars 8 forks source link

Introduce Watchdog functionality #23

Open npeditto opened 8 years ago

npeditto commented 8 years ago

@gmerlino in a previuos beta release started to introduce a process control based on the linux watchdog daemon to keep alive the main process of lightning-rod. We should introduce this control mechanism.

gmerlino commented 8 years ago

This mechanism should be based on writing periodically to /dev/watchdog (abstract enough to be valid on many platforms, e.g. on the YUN there is only a software watchdog (kernel-side implementation as either a module or built-in), but on other devices the devicefile could be an abstraction of an hardware watchdog (obviously, more reliable), for instance we should check what is available on the Raspberry, whereas for Android it is overkill to reboot the device when LR stops working somehow, there we need to investigate other options (thus, another bug for that).

A daemon called watchdog is typically installed (on the YUN) which writes to the device.

We need to replace that one with LR, taking care of establishing a large enough interval to avoid endless looping, e.g., without enough time to intervene manually when the need arises, such as in the presence of showstopper bugs in deployed LR code.