Skip to content

NC | Online Upgrade events#8670

Merged
romayalon merged 1 commit into
noobaa:masterfrom
romayalon:romy-online-upgrade-events
Jan 9, 2025
Merged

NC | Online Upgrade events#8670
romayalon merged 1 commit into
noobaa:masterfrom
romayalon:romy-online-upgrade-events

Conversation

@romayalon

@romayalon romayalon commented Jan 9, 2025

Copy link
Copy Markdown
Contributor

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
Comment thread src/manage_nsfs/manage_nsfs_events_utils.js
@romayalon romayalon requested a review from shirady January 9, 2025 09:25
Signed-off-by: Romy <35330373+romayalon@users.noreply.github.com>
@romayalon romayalon force-pushed the romy-online-upgrade-events branch from c6b6882 to 7931c7d Compare January 9, 2025 09:26

@shirady shirady left a comment

Copy link
Copy Markdown
Contributor

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
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