Marking apps as "required"

Hey all,

Is there a way to indicate an app is “required” in the sense that it needs to be running for the system to function? I already have the the faultAction set to reboot and I’ve played around with the watchdog, but I don’t think this covers the case that the app never starts (to my knowledge the watchdog requires at least one “kick” when the app starts).

If anyone has any ideas its much appreciated!

Cheers

Hiya,

Hmm, not sure. If the application is in the service directory to start, the the Legato framework should always start it - even if it faults immediately.

You can manually mark the whole system as good to force the reboot/restart process to be in play and not roll your system back while you’re doing development

From the command line run the command

update -g

to mark the system good.

ciao, Dave

Hi,

To ensure that the application is always running at startup, add in the .adef start: auto. This way, the supervisor will automatically launch it (after install, after reboot, …). It’s also a good idea to kick the watchdog at the beginning of the COMPONENT_INIT.

Now, if your app must be present in all your products in the same way as Legato daemons, you might think about tweaking a little bit the Legato default.sdef file by adding the root folder of your application. Thus, it will be built-in the Legato itself.

Regards,

Hey all,

Thanks for the suggestions. We’ve had good luck using system definition files (we extend from default.sdef) and start: auto in app definitions, but I’m more so concerned about cases where the update service removes the app or when an interprocess binding fails or hangs up (e.g one of our apps has not kicked the watchdog because it’s waiting for avcService).

In many ways I feel the better solution here would be some error reporting. How should developers learn about critical failures (like seg faults) in the field? I’ve built some error handling for errors that are “catchable” in our code (e.g failed to read sensor at /sys/bus/i2c/...), but this does not really cover the case when a “hard crash” occurs.

Hi,
Firstly, for the interprocess binding failures, Service directory tool can be used for troubleshooting. If an application is waiting to bind to a service ‘sdir list’ will display this application in the list of applications that are unbound and waiting for a service. You can refer to the following link for information on Service directory tool.
URL: sdir - Legato Docs

The second query is not clear for me. Are you looking for remote syslog logging?