noobaa / noobaa-core

High-performance S3 application gateway to any backend - file / s3-compatible / multi-clouds / caching / replication ...
https://www.noobaa.io
Apache License 2.0
273 stars 80 forks source link

NC | Online Upgrade | Health CLI update config directory and upgrade checks #8532

Open romayalon opened 1 week ago

romayalon commented 1 week ago

Explain the changes

  1. Added a check in the Health CLI that shows the config directory status if exists.
  2. Added a check in the Health CLI that asserts if the upgrade of the config directory has issues, this situation can be discovered by phase of the config directory is locked and there is no ongoing upgrade.
  3. Added unit tests (and did some refactoring).
  4. Fixed a bug that sets the process name to be Upgrade, it's showing in the logs of the endpoint, CLI etc.

Issues: Fixed #xxx / Gap #xxx

  1. Another idea for a health check - check per host if config directory is locked.

Testing Instructions:

  1. sudo node ./node_modules/mocha/bin/mocha src/test/unit_tests/test_nc_health.js