openvstorage / openvstorage-health-check

The health check is classified as a monitoring and detection tool for Open vStorage.
3 stars 7 forks source link

Make disk safety check configurable #460

Closed wimpers closed 6 years ago

wimpers commented 6 years ago

We should make the disk safety check configurable you can can disable the check for global backends or local backends (and maybe even allow to exclude certain backends by name)

wimpers commented 6 years ago

Might be worthwhile to tackle https://github.com/openvstorage/openvstorage-health-check/issues/459 at the same time.

wimpers commented 6 years ago

This one is for OPS to fix their CheckMk.

wimpers commented 6 years ago

After BAM: decision was to do it name based

JeffreyDevloo commented 6 years ago

Fixed by https://github.com/openvstorage/openvstorage-health-check/pull/468 Packaged in openvstorage-health-check_3.8.0-dev.1527510338.6c60a57-1_amd64.deb

Usage:

root@DEV-3N-199-181:~# ovs healthcheck alba disk-safety-test --help
Usage: alba alba disk-safety-test [OPTIONS]

  Verifies that namespaces have enough safety

Options:
  -b, --backend TEXT             Backend(s) to check for. Can be provided
                                 multiple times. Ignored if --skip-backend
                                 option is given
  -s, --skip-backend TEXT        Backend(s) to skip checking for. Can be
                                 provided multiple times
  -i, --include-errored-as-dead  OSDs with errors as treated as dead ones
                                 during the calculation
  --help                         Show this message and exi

Examples:

root@DEV-3N-199-181:~# ovs healthcheck alba disk-safety-test -b mybackend
[INFO] Starting OpenvStorage Healthcheck version 3.4.8-1
[INFO] ======================
No handlers could be found for logger "ovs_extensions.generic.volatilemutex"
[SUCCESS] Call is being executed by DEV-3N-199-182 - 10.100.199.182.
[INFO] Recap of Health Check!
[INFO] ======================
[INFO] SUCCESS=1 FAILED=0 SKIPPED=0 WARNING=0 EXCEPTION=0
root@DEV-3N-199-181:~# ovs healthcheck alba disk-safety-test -b mybackend
[INFO] Starting OpenvStorage Healthcheck version 3.4.8-1
[INFO] ======================
[INFO] Checking disk safety on backend: mybackend
[INFO] Checking policy 1,2 with max. disk safety 2
[SUCCESS] All data is safe on backend mybackend with 7 namespace(s)
[INFO] Recap of Health Check!
[INFO] ======================
[INFO] SUCCESS=1 FAILED=0 SKIPPED=0 WARNING=0 EXCEPTION=0
root@DEV-3N-199-181:~# ovs healthcheck alba disk-safety-test -s mybackend
[INFO] Starting OpenvStorage Healthcheck version 3.4.8-1
[INFO] ======================
[INFO] Checking disk safety on backend: mybackend02
[INFO] Checking policy 1,2 with max. disk safety 2
[SUCCESS] All data is safe on backend mybackend02 with 6 namespace(s)
[INFO] Checking disk safety on backend: mybackend-global
[INFO] Checking policy 1,1 with max. disk safety 1
[SUCCESS] All data is safe on backend mybackend-global with 4 namespace(s)
[INFO] Recap of Health Check!
[INFO] ======================
[INFO] SUCCESS=2 FAILED=0 SKIPPED=0 WARNING=0 EXCEPTION=0
root@DEV-3N-199-181:~# ovs healthcheck alba disk-safety-test -s mybackend -s mybackend-global
[INFO] Starting OpenvStorage Healthcheck version 3.4.8-1
[INFO] ======================
[INFO] Checking disk safety on backend: mybackend02
[INFO] Checking policy 1,2 with max. disk safety 2
[SUCCESS] All data is safe on backend mybackend02 with 6 namespace(s)
[INFO] Recap of Health Check!
[INFO] ======================
[INFO] SUCCESS=1 FAILED=0 SKIPPED=0 WARNING=0 EXCEPTION=0
root@DEV-3N-199-181:~# 
JeffreyDevloo commented 6 years ago

Released in https://github.com/openvstorage/openvstorage-health-check/releases/tag/3.4.9 and https://github.com/openvstorage/openvstorage-health-check/releases/tag/3.8.0