Skip to content

NC | Lifecycle | Health #8893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2025
Merged

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Mar 23, 2025

Describe the Problem

The NC health CLI should report on the latest lifecycle worker run.

Explain the Changes

  1. health.js - Added get_lifecycle_health_status() and get_latest_lifecycle_run_status() functions that return the status of the latest lifecycle run on the current host.
  2. manage_nsfs_constants - added --lifecycle flag to health options
  3. manage_nsfs_help_utils - added --lifecycle help.
  4. test_nc_health.js - added unit tests

Issues: Fixed #xxx / Gap #xxx

  1. Gap - Open question - do we need to trigger an event with Degraded/Healthy status?

Testing Instructions:

  1. Auto -
sudo NC_CORETEST=true node ./node_modules/mocha/bin/mocha src/test/unit_tests/test_nc_health.js  --g "health - lifecycle"
  1. Manual -
    a. Empty scenario - run noobaa-cli diagnose health --lifecycle
    b. valid scenario -
    b.1. run noobaa-cli lifecycle 3 times.
    b.2. run noobaa-cli diagnose health --lifecycle and expect to have the latest run information.
    c. error scenario =
    c.1. Edit config.json and set NC_LIFECYLE_TIMEOUT_MS to be 1.
    c.2. run noobaa-cli diagnose health --lifecycle and expect to have the latest run information including the timeout error.
  • Doc added/updated
  • Tests added

@romayalon romayalon force-pushed the romy-nc-lifecycle-health branch from bb2d9bf to 4a4f3d0 Compare March 23, 2025 16:48
@romayalon romayalon requested a review from nadavMiz March 24, 2025 07:42
@romayalon romayalon requested a review from shirady March 24, 2025 14:32
Copy link
Contributor

@shirady shirady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@nadavMiz nadavMiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@romayalon romayalon force-pushed the romy-nc-lifecycle-health branch from 2a24040 to b331051 Compare March 24, 2025 15:57
@romayalon romayalon merged commit 8bca078 into noobaa:master Mar 24, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants