Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I have rgmanager behave differently based on the return code of my init script?

0
Posted

Can I have rgmanager behave differently based on the return code of my init script?

0

Here are some rules for service script writing: Always return “0” if the status is non-fatal. Rgmanager follows the LSB + OCF RA API draft specifications. That means that 0 is “OK” from running a “status” operation and non-zero is “not OK”. Some scripts do check-restarts of non-critical components from within the “status” check. If you have a “recover” action in a resource agent (resource agent > plain script), rgmanager will try a “recover” operation first (and will fall back to full service restart if recovery fails). A “recover” action is by definition *not allowed* to interfere with other parts of the service. So, if a component X fails, and recovery succeeds, the rest of the service continues running uninterrupted. None of our agents except the nfsclient have recover actions because they’re all considered critical (file systems, IPs, etc.). You could add a “critical” parameter to resource agents and always return 0 if “$OCF_RESKEY_critical” is not set in the script(s), or not allo

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123