Skip to content
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

NC | Online Upgrade events #8670

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

romayalon
Copy link
Contributor

@romayalon romayalon commented Jan 9, 2025

Explain the changes

Added online upgrade events on start, success and failure of the config directory upgrade.
For example -
While running the command - noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts hostname1 the following events will be created on success/failure.

1. Start event -

Jan-9 10:15:34.509 [/22415] [EVENT]{"timestamp":"2025-01-09T08:15:34.509Z","host":"hostname1","event":{"code":"config_dir_upgrade_started","message":"Config directory upgrade started.","description":"Config directory upgrade started.","entity_type":"NODE","event_type":"INFO","scope":"NODE","severity":"INFO","state":"HEALTHY","arguments":{"expected_version":"5.18.0","expected_hosts":["hostname1"]},"pid":22415}}

2. Failure event -

Jan-9 10:15:34.512 [/22415] [EVENT]{"timestamp":"2025-01-09T08:15:34.512Z","host":"hostname1","event":{"code":"config_dir_upgrade_failed","message":"Config directory upgrade failed.","description":"Config directory upgrade failed due to an error","entity_type":"NODE","event_type":"ERROR","scope":"NODE","severity":"ERROR","state":"DEGRADED","arguments":{"error":"Error: system does not exist\n    at NCUpgradeManager.upgrade_config_dir (noobaa-core/src/upgrade/nc_upgrade_manager.js:102:33)\n    at async start_config_dir_upgrade (noobaa-core/src/manage_nsfs/upgrade.js:55:29)\n    at async Object.manage_upgrade_operations (noobaa-core/src/manage_nsfs/upgrade.js:23:13)\n    at async main (noobaa-core/src/cmd/manage_nsfs.js:74:13)"},"pid":22415}}

3. Success event -

Jan-9 10:16:48.482 [/23116] [EVENT]{"timestamp":"2025-01-09T08:16:48.482Z","host":"hostname1","event":{"code":"config_dir_upgrade_successful","message":"Config directory upgrade finished successfully.","description":"Config directory upgrade finished successfully.","entity_type":"NODE","event_type":"INFO","scope":"NODE","severity":"INFO","state":"HEALTHY","arguments":{"expected_version":"5.18.0","expected_hosts":["hostname1"]},"pid":23116}}

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  1. Run noobaa-cli upgrade start --expected_version 5.18.0 --expected_hosts hostname1 when upgrade is valid/invalid.
  • Doc added/updated
  • Tests added

@romayalon romayalon force-pushed the romy-online-upgrade-events branch from b6d1b19 to c6b6882 Compare January 9, 2025 08:30
@romayalon romayalon requested a review from shirady January 9, 2025 09:25
@romayalon romayalon force-pushed the romy-online-upgrade-events branch from c6b6882 to 7931c7d Compare January 9, 2025 09:26
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

@romayalon romayalon merged commit 56cab66 into noobaa:master Jan 9, 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.

2 participants