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

Restrict user overrides for remote store related index settings #8812

Merged

Conversation

linuxpi
Copy link
Collaborator

@linuxpi linuxpi commented Jul 21, 2023

Short Description

This change ensures user cannot tinker with any remote store related index settings. This will ensure our clusters remain homogeneous i.e. either the cluster has all remote enabled indices or no remote enabled indices.

Detailed Description

With this change we are restricting the following index level settings:

  • index.remote_store.enabled
  • index.remote_store.segment.repository
  • index.remote_store.translog.repository

user will not be able to override these settings while creating an index.

If following cluster level settings are set then we will inject the above settings with the corresponding cluster level settings mentioned below.

  • cluster.remote_store.enabled
  • cluster.remote_store.segment.repository
  • cluster.remote_store.translog.repository

Related Issues

Resolves #8770

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@linuxpi linuxpi force-pushed the restrict-remote-store-index-settings branch from 65c2168 to 8e73972 Compare July 21, 2023 06:33
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@linuxpi linuxpi force-pushed the restrict-remote-store-index-settings branch from 942abe0 to 036c85d Compare July 21, 2023 08:58
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@linuxpi linuxpi force-pushed the restrict-remote-store-index-settings branch from dc05c60 to 2e9b461 Compare July 31, 2023 17:47
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@linuxpi linuxpi force-pushed the restrict-remote-store-index-settings branch from 2e9b461 to dddc2b9 Compare August 1, 2023 02:38
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testIndexDeletionDuringSnapshotCreationInQueue
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=cluster.allocation_explain/10_basic/cluster shard allocation explanation test with empty request}

linuxpi added 3 commits August 1, 2023 09:11
…reRepositoryTests

Signed-off-by: bansvaru <bansvaru@amazon.com>
…ndex settings

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: bansvaru <bansvaru@amazon.com>
@linuxpi linuxpi force-pushed the restrict-remote-store-index-settings branch from dddc2b9 to 839aa94 Compare August 1, 2023 03:42
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationRelocationIT.testRelocateWhileContinuouslyIndexingAndWaitingForRefresh
      1 org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=cluster.allocation_explain/10_basic/cluster shard allocation explanation test with empty request}

Copy link
Collaborator

@gbbafna gbbafna left a comment

Choose a reason for hiding this comment

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

LGTM.

Signed-off-by: Gaurav Bafna <85113518+gbbafna@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=search.aggregation/20_terms/string profiler via map}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=search.aggregation/20_terms/string profiler via global ordinals}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=search.aggregation/10_histogram/date_histogram profiler}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=search.aggregation/10_histogram/date_histogram profiler}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=cluster.allocation_explain/10_basic/cluster shard allocation explanation test with empty request}
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=cluster.allocation_explain/10_basic/cluster shard allocation explanation test with empty request}

@gbbafna gbbafna merged commit 66ea4b3 into opensearch-project:main Aug 1, 2023
@gbbafna gbbafna deleted the restrict-remote-store-index-settings branch August 1, 2023 13:24
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Aug 1, 2023
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8812-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 66ea4b3d736d676880b776039e0b901707cf7e7c
# Push it to GitHub
git push --set-upstream origin backport/backport-8812-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-8812-to-2.x.

linuxpi added a commit to linuxpi/OpenSearch that referenced this pull request Aug 1, 2023
…search-project#8812)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
(cherry picked from commit 66ea4b3)
@dreamer-89
Copy link
Member

@linuxpi : Can you please merge the backport PR #9025 to 2.x. This is blocking other PRs which have changes on top of yours.

@linuxpi
Copy link
Collaborator Author

linuxpi commented Aug 3, 2023

@linuxpi : Can you please merge the backport PR #9025 to 2.x. This is blocking other PRs which have changes on top of yours.

Working on fixing the one test that is failing. Looks like the code is diff on main vs 2.x . I've raise a PR for the fix #9084 will get it merged.

linuxpi added a commit to linuxpi/OpenSearch that referenced this pull request Aug 3, 2023
…search-project#8812)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
(cherry picked from commit 66ea4b3)
sachinpkale pushed a commit that referenced this pull request Aug 3, 2023
…tings (#8812) (#9025)

---------

Signed-off-by: bansvaru <bansvaru@amazon.com>
Signed-off-by: Varun Bansal <bansvaru@amazon.com>
kaushalmahi12 pushed a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 12, 2023
…search-project#8812)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
brusic pushed a commit to brusic/OpenSearch that referenced this pull request Sep 25, 2023
…search-project#8812)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…search-project#8812)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Remote Store] Restrict index level remote store settings
4 participants