Coder Social home page Coder Social logo

fcrozat / health-checker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opensuse/health-checker

0.0 0.0 0.0 98 KB

Systemd service to check, if the system does come up correct after an update

License: GNU General Public License v2.0

Shell 77.91% Makefile 7.28% M4 14.81%

health-checker's Introduction

health-checker

Check the state of a openSUSE MicroOS system after a reboot.

How does this work?

health-checker will be called by a systemd service during the boot process. All services, which should be checked, needs to be listed in the 'After' section.

The health-checker script will call several plugins. Every plugin is responsible to check a special service or condition. For this, the plugin is called with the option check. If this fails, the plugin will exit with the return value 1, else 0. If everyting was fine, the script will create a /var/lib/misc/health-checker.state file with the number of the current, working btrfs subvolume with the root filesystem. If a plugin reports an error condition, the health-checker script will take following actions:

  1. If the current btrfs root subvolume is not identical with the last known working snapshot, an automatic rollback to that snapshot is made. Normally, if the current btrfs subvolume is not identical to the last working one, this means an update was made, and this update did never boot correctly.
  2. If the current btrfs subvolume did already boot successful in the past, the problem is most likely a temporary problem. In this case, we try to reboot the machine again. /var/lib/misc/health-check.rebooted will be created with the current time.
  3. If the current btrfs snapshot did already boot successful in the past and if we did try already to solve the problem with a reboot, it doesn't make sense to reboot again. To give the admin the chance and possibility to fix the problem, all plugins will be called with the option stop. At the end, the machine should still run, so that an admin can login, but no service should run, so that nothing can break.

health-checker's People

Contributors

laenion avatar thkukuk avatar northofthule avatar schubi2 avatar vogtinator avatar kravciak avatar rdoxenham avatar chlorophytus 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.