Skip to content

Add cluster.initial_cluster_manager_nodes to testClusters OVERRIDABLE_SETTINGS#20348

Merged
cwperks merged 2 commits intoopensearch-project:mainfrom
lawofcycles:testclusters-search-node-support
Jan 2, 2026
Merged

Add cluster.initial_cluster_manager_nodes to testClusters OVERRIDABLE_SETTINGS#20348
cwperks merged 2 commits intoopensearch-project:mainfrom
lawofcycles:testclusters-search-node-support

Conversation

@lawofcycles
Copy link
Copy Markdown
Contributor

@lawofcycles lawofcycles commented Jan 1, 2026

Description

Add cluster.initial_cluster_manager_nodes and cluster.initial_master_nodes to OVERRIDABLE_SETTINGS in the testClusters Gradle plugin.

This enables creating multi-node test clusters with search-only nodes. Currently, testClusters sets cluster.initial_cluster_manager_nodes to include all node names regardless of their node.roles setting, and this cannot be overridden. Since the search role cannot be combined with cluster_manager, clusters with search-only nodes fail to form.

With this change, users can override the setting to include only cluster_manager-eligible nodes:

testClusters.integTest {
   numberOfNodes = 2
   nodes[0].setting 'node.roles', '[cluster_manager,data]'
   nodes[1].setting 'node.roles', '[search]'
   nodes[1].setting 'node.search.cache.size', '100mb'
   setting 'cluster.initial_cluster_manager_nodes', '[integTest-0]'
}

Related Issues

Resolves #20347

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Summary by CodeRabbit

  • Chores
    • Enhanced test cluster configuration to allow overriding additional initial cluster manager/master node settings and the indices memory breaker setting, improving flexibility for test environments.

✏️ Tip: You can customize this high-level summary in your review settings.

…_SETTINGS

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
@lawofcycles lawofcycles requested a review from a team as a code owner January 1, 2026 11:14
@github-actions github-actions bot added Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. enhancement Enhancement or improvement to existing feature or request labels Jan 1, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 1, 2026

📝 Walkthrough

Walkthrough

This change adds two OpenSearch cluster settings (cluster.initial_cluster_manager_nodes and cluster.initial_master_nodes) to the OVERRIDABLE_SETTINGS list in OpenSearchNode, enabling users to override these settings when configuring test clusters. This allows creation of multi-node test clusters that include search-only nodes.

Changes

Cohort / File(s) Summary
OVERRIDABLE_SETTINGS expansion
buildSrc/src/main/java/org/opensearch/gradle/testclusters/OpenSearchNode.java
Added cluster.initial_cluster_manager_nodes and cluster.initial_master_nodes to the OVERRIDABLE_SETTINGS constant list, allowing these settings to be overridden in test cluster configurations

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop, skip, and a search node bound,
At last they can join, without a sound!
No more conflicts, no more strife—
Test clusters bloom with multinode life! 🌱✨

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change - adding cluster.initial_cluster_manager_nodes to OVERRIDABLE_SETTINGS, though it omits the second related setting (cluster.initial_master_nodes) also added.
Linked Issues check ✅ Passed The PR successfully addresses both requirements from issue #20347 by adding cluster.initial_cluster_manager_nodes and cluster.initial_master_nodes to OVERRIDABLE_SETTINGS, enabling the requested multi-node test cluster with search-only nodes support.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue requirements. The modifications to OVERRIDABLE_SETTINGS in OpenSearchNode.java are precisely scoped to address the feature request for search-only node support in testClusters.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description is well-structured and addresses the required template sections with substantive content.
✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

❌ Gradle check result for 77dd747: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 1, 2026

✅ Gradle check result for 77dd747: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.22%. Comparing base (e9b5bd1) to head (77dd747).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20348      +/-   ##
============================================
- Coverage     73.27%   73.22%   -0.05%     
+ Complexity    71739    71703      -36     
============================================
  Files          5785     5785              
  Lines        328143   328143              
  Branches      47270    47270              
============================================
- Hits         240445   240289     -156     
- Misses        68397    68511     +114     
- Partials      19301    19343      +42     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cwperks cwperks merged commit d969da9 into opensearch-project:main Jan 2, 2026
36 of 38 checks passed
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
…_SETTINGS (opensearch-project#20348)

* Add cluster.initial_cluster_manager_nodes to testClusters OVERRIDABLE_SETTINGS

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>

* update CHANGELOG.md

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>

---------

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
tanyabti pushed a commit to tanyabti/OpenSearch that referenced this pull request Feb 24, 2026
…_SETTINGS (opensearch-project#20348)

* Add cluster.initial_cluster_manager_nodes to testClusters OVERRIDABLE_SETTINGS

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>

* update CHANGELOG.md

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>

---------

Signed-off-by: Sotaro Hikita <bering1814@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Build Tasks/Gradle Plugin, groovy scripts, build tools, Javadoc enforcement. enhancement Enhancement or improvement to existing feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Support search-only nodes in testClusters plugin

2 participants