GithubHelp home page GithubHelp logo

isabella232 / salt-formula-watchdog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from salt-formulas/salt-formula-watchdog

0.0 0.0 0.0 32 KB

Salt formula for Linux watchdog daemon

License: Other

Shell 56.50% Makefile 34.14% HTML 1.65% SaltStack 7.71%

salt-formula-watchdog's Introduction

Watchdog Formula

The Linux kernel can reset the system if serious problems are detected. This can be implemented via special watchdog hardware, or via a slightly less reliable software-only watchdog inside the kernel. Either way, there needs to be a daemon that tells the kernel the system is working fine. If the daemon stops doing that, the system is reset.

watchdog is such a daemon. It opens /dev/watchdog, and keeps writing to it often enough to keep the kernel from resetting, at least once per minute. Each write delays the reboot time another minute. After a minute of inactivity the watchdog hardware will cause the reset. In the case of the software watchdog the ability to reboot will depend on the state of the machines and interrupts.

This formula installs and configure watchdog daemon

Sample Pillars

Single watchdog service

watchdog:
  server:
    admin: root
    enabled: true
    interval: 1
    log_dir: /var/log/watchdog
    realtime: yes
    timeout: 60
    device: /dev/watchdog

Sample Pillars with kernel module

Salt Stack will automatically detect the necessary kernel module which needs to be loaded (ex. hpwdt, iTCO_wdt). If the hardware model is not predefined in map.jinja the default watchdog driver is used: softdog You may specify the kernel parameters if needed:

 watchdog:
   server:
     admin: root
     enabled: true
     interval: 1
     log_dir: /var/log/watchdog
     realtime: yes
     timeout: 60
     device: /dev/watchdog
     module: softdog
......
......
 linux:
   system:
     kernel:
       module:
         softdog:
           option:
             soft_panic: 1

INFO: extra formula [salt-formula-linux](https://github.com/salt-formulas/salt-formula-linux) required.

In that case, apply command should also care about linux state. For example:

salt "kvm0*" -l debug state.apply watchdog.server,linux.system.kernel -l debug

More Information

https://github.com/torvalds/linux/blob/master/Documentation/watchdog/watchdog-api.txt Those formula also support json-schema definition with all options. Please refer to "watchdog/schemas/*.yaml" for more information.

Documentation and Bugs

To learn how to install and update salt-formulas, consult the documentation available online at:

http://salt-formulas.readthedocs.io/

In the unfortunate event that bugs are discovered, they should be reported to the appropriate issue tracker. Use GitHub issue tracker for specific salt formula:

https://github.com/salt-formulas/salt-formula-watchdog/issues

For feature requests, bug reports or blueprints affecting entire ecosystem, use Launchpad salt-formulas project:

https://launchpad.net/salt-formulas

Developers wishing to work on the salt-formulas projects should always base their work on master branch and submit pull request against specific formula.

You should also subscribe to mailing list ([email protected]):

https://www.freelists.org/list/salt-formulas

Any questions or feedback is always welcome so feel free to join our IRC channel:

#salt-formulas @ irc.freenode.net

To-Do

Remove the part in watchdog/server.sls about the Ubuntu Xenial bug once it's fixed in upstream: https://bugs.launchpad.net/ubuntu/+source/watchdog/+bug/1448924

salt-formula-watchdog's People

Contributors

alexz-kh avatar dstremkouski avatar epcim avatar fpytloun avatar martin819 avatar ruzickap avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.