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

Hide remote reindex migration behind feature flag #20636

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

todvora
Copy link
Contributor

@todvora todvora commented Oct 3, 2024

Description

Remote reindex migration will be enabled only when remote_reindex_migration is set to on

We will then add the following changes:

For all users:

  • „Methods for migration” block on welcome page is hidden when feature flag is set

For users with incompatible versions:

  • On the migration welcome page a comment is shown that they are using an incompatible version and that they need to upgrade to Opensearch to be able to use the migration wizard (only if feature flag is set)
  • Not able to proceed past welcome page if feature flag is set
  • This implies: No simple (i.e. without manual steps) way to migrate to an empty data node is available

For users with compatible versions:

  • No choice of migration method shown if feature flag is set, lead directly to in-place migration

Motivation and Context

Implements https://github.com/Graylog2/graylog-plugin-enterprise/issues/8811

image

How Has This Been Tested?

Manually, switching the feature flag

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 updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

Copy link
Contributor

@moesterheld moesterheld left a comment

Choose a reason for hiding this comment

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

Good solution, but there is still a part missing. This will leave users on Elasticsearch stuck in the wizard with no info why they can't proceed.
We either need to add a warning in the beginning that migration of data for these versions isn't supported and remove the guard or move the guard to the beginning of the wizard and also let them know in the UI.
And both the guard and the UI warning need to be aware of the feature flag

@todvora
Copy link
Contributor Author

todvora commented Oct 4, 2024

@moesterheld what about hiding the migration button/menu completely if you are on elasticsearch?

@moesterheld
Copy link
Contributor

@todvora Hiding the tab completely would work, but would also take them the ability to move to data node without migrating any data. Some people might be happy to start with an empty Opensearch in data node.

Copy link
Contributor Author

@todvora todvora left a comment

Choose a reason for hiding this comment

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

The backend part from @moesterheld looks good. I can't approve my own PR, but I tested it again locally.

Copy link
Contributor

@grotlue grotlue left a comment

Choose a reason for hiding this comment

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

Code-wise it looks good, one small comment and the Reviewbot also has some remarks. But don't want to block it because of that.

<p>You can get more information on the Data Node migration <DocumentationLink page="graylog-data-node" text="documentation" />.</p>
<br />
<MigrationDatanodeList />
{!(isElasticsearch && !isRemoteReindexingEnabled) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{!(isElasticsearch && !isRemoteReindexingEnabled) && (
{(!isElasticsearch && !isRemoteReindexingEnabled) && (

makes it clearer I think

Copy link
Contributor

Choose a reason for hiding this comment

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

that's not a typo it's the negation of (isElasticsearch && !isRemoteReindexingEnabled)

Copy link
Contributor

Choose a reason for hiding this comment

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

@grotlue it looks like that changes the logic

Copy link
Contributor

@moesterheld moesterheld left a comment

Choose a reason for hiding this comment

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

Checked frontend functionality for all cases. LGTM

@vvasylenko
Copy link

Looks good 👍

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.

5 participants