Skip to content

Fix premature OpenSearch transition during Data Node upgrade - #27138

Merged
gally47 merged 5 commits into
masterfrom
fix-ent-15320
Sep 7, 2026
Merged

Fix premature OpenSearch transition during Data Node upgrade#27138
gally47 merged 5 commits into
masterfrom
fix-ent-15320

Conversation

@gally47

@gally47 gally47 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

/nocl

Description

Prevents the wizard from advancing to the embedded OpenSearch upgrade before the Data Node rolling upgrade is complete. It now waits until all Data Nodes are updated and shard replication is restored. Once the OpenSearch upgrade starts, its progress remains visible throughout the rolling restart.

Motivation and Context

fixes https://github.com/Graylog2/graylog-plugin-enterprise/issues/15320

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have requested a documentation update.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copilot AI 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.

Pull request overview

Prevents premature transition to the OpenSearch upgrade phase during Data Node upgrades.

Changes:

  • Requires current Data Node versions and enabled shard replication before transitioning.
  • Retains pending-node state when replication startup fails.
  • Adds regression coverage for phase transitions and marker cleanup.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
graylog2-web-interface/src/pages/DataNodeUpgradePage.tsx Updates phase detection and confirmation handling.
graylog2-web-interface/src/pages/DataNodeUpgradePage.test.tsx Covers replication and stale-marker scenarios.
graylog2-web-interface/src/components/datanode/hooks/useDataNodeUpgradeStatus.ts Clears pending state only after successful replication startup.
graylog2-web-interface/src/components/datanode/hooks/useDataNodeUpgradeStatus.test.ts Tests pending-state retention and cleanup.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gally47 gally47 self-assigned this Aug 27, 2026
@gally47
gally47 requested a review from vvasylenko August 27, 2026 12:58
@gally47
gally47 requested a review from a team August 28, 2026 10:48

@laura-b-g laura-b-g 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.

Looking good, just a small comment. Nothing blocking

Comment on lines +97 to +99
openSearchStatus === 'upgrading' || (areAllDataNodeVersionsUpToDate && data?.shard_replication_enabled === true);
const showOpenSearchUpgradeSection =
areAllDataNodesUpToDate && ['outdated', 'upgrading', 'unconfirmed'].includes(openSearchStatus);
isOpenSearchPhase && ['outdated', 'upgrading', 'unconfirmed'].includes(openSearchStatus);

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.

I think it would be nice to put the openSearchStatus in a as const

@gally47
gally47 merged commit d59f4ef into master Sep 7, 2026
33 of 34 checks passed
@gally47
gally47 deleted the fix-ent-15320 branch September 7, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants