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

Deprecate setting 'cluster.initial_master_nodes' and introduce the alternative setting 'cluster.initial_cluster_manager_nodes' #2463

Merged
merged 18 commits into from
Mar 18, 2022

Conversation

tlfeng
Copy link
Collaborator

@tlfeng tlfeng commented Mar 14, 2022

Description

  • Add a new setting cluster.initial_cluster_manager_nodes, aims to replace the existing cluster.initial_master_nodes
  • Set the value of the old setting cluster.initial_master_nodes as the fallback to the new setting
  • Deprecate the existing setting cluster.initial_master_nodes
  • Add unit tests

Reference: commit 63c75d1 / PR #2221

Deprecation notice:
With the built-in deprecation logger of OpenSearch (code), the following message will be recorded in the log files:
In logs/opensearch_deprecation.log:
[2022-03-07T20:48:57,158][DEPRECATION][o.o.d.c.s.Settings ] [ip-100-00-00-000] [cluster.initial_master_nodes] setting was deprecated in OpenSearch and will be removed in a future release! See the breaking changes documentation for the next major version.
In logs/opensearch_deprecation.json:
{"type": "deprecation", "timestamp": "2022-03-07T20:48:57,158Z", "level": "DEPRECATION", "component": "o.o.d.c.s.Settings", "cluster.name": "opensearch", "node.name": "ip-100-00-00-000", "message": "[cluster.initial_master_nodes] setting was deprecated in OpenSearch and will be removed in a future release! See the breaking changes documentation for the next major version." }

Issues Resolved

Part of #1549

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

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.

…er.initial_cluster_manager_nodes

Signed-off-by: Tianli Feng <[email protected]>
@tlfeng tlfeng requested a review from a team as a code owner March 14, 2022 18:37
@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@tlfeng tlfeng added enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0 documentation pending Tracks issues which have PRs merged but documentation changes pending labels Mar 14, 2022
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 4ea1231
Log 3351

Reports 3351

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 11646a4
Log 3358

Reports 3358

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 14, 2022

In log 3358:

> Task :qa:rolling-upgrade:v1.3.0#oldClusterTest

=== Standard output of node `node{:qa:rolling-upgrade:v1.3.0-0}` ===

»    ↓ errors and warnings from /var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/qa/rolling-upgrade/build/testclusters/v1.3.0-0/logs/opensearch.stdout.log ↓
» ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [v1.3.0-0] uncaught exception in thread [main]
»  org.opensearch.bootstrap.StartupException: java.lang.IllegalArgumentException: unknown setting [cluster.initial_cluster_manager_nodes] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
»  	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:182) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:169) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) ~[opensearch-cli-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.cli.Command.main(Command.java:101) ~[opensearch-cli-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:135) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:101) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  Caused by: java.lang.IllegalArgumentException: unknown setting [cluster.initial_cluster_manager_nodes] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
»  	at org.opensearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:589) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:530) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:500) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:470) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.common.settings.SettingsModule.<init>(SettingsModule.java:161) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.node.Node.<init>(Node.java:463) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.node.Node.<init>(Node.java:319) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:412) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:178) ~[opensearch-1.3.0-SNAPSHOT.jar:1.3.0-SNAPSHOT]
»  	... 6 more

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 1fa949c
Log 3359

Reports 3359

@tlfeng tlfeng force-pushed the setting-initial-master-node branch from 45ae584 to 7b09e6c Compare March 14, 2022 21:13
@tlfeng tlfeng force-pushed the setting-initial-master-node branch from 7b09e6c to 04ced0d Compare March 14, 2022 21:16
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 7b09e6c539ee08cd3e1701c441d2725a95fd3d88
Log 3360

Reports 3360

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 04ced0d
Log 3361

Reports 3361

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure cf22874
Log 3364

Reports 3364

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 14, 2022

In log 3364:

> Task :qa:remote-clusters:integTest

REPRODUCE WITH: ./gradlew ':qa:remote-clusters:integTest' --tests "org.opensearch.cluster.remote.test.RemoteClustersIT.testHAProxyModeConnectionWorks" -Dtests.seed=373CDFD0EF8BD8AA -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=nb-NO -Dtests.timezone=Canada/Saskatchewan -Druntime.java=17

org.opensearch.cluster.remote.test.RemoteClustersIT > testHAProxyModeConnectionWorks FAILED
    java.lang.AssertionError
        at __randomizedtesting.SeedInfo.seed([373CDFD0EF8BD8AA:304A0A1BD40DAEF7]:0)
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertTrue(Assert.java:53)
        at org.opensearch.cluster.remote.test.RemoteClustersIT.testHAProxyModeConnectionWorks(RemoteClustersIT.java:125)

It's reported in issue #1703

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 15, 2022

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure cf22874
Log 3382

Reports 3382

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 15, 2022

In log 3382:

REPRODUCE WITH: ./gradlew ':qa:mixed-cluster:v1.3.0#mixedClusterTest' --tests "org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT" -Dtests.method="test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does}" -Dtests.seed=39544BF2007F84D3 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=cs -Dtests.timezone=Brazil/DeNoronha -Druntime.java=17

org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT > test {p0=indices.get_field_mapping/20_missing_field/Return empty object if field doesn't exist, but index does} FAILED
    java.lang.AssertionError: Failure at [indices.get_field_mapping/20_missing_field:20]: field [test_index.mappings] is null
        at __randomizedtesting.SeedInfo.seed([39544BF2007F84D3:B1007428AE83E92B]:0)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.executeSection(OpenSearchClientYamlSuiteTestCase.java:442)
        at org.opensearch.test.rest.yaml.OpenSearchClientYamlSuiteTestCase.test(OpenSearchClientYamlSuiteTestCase.java:415)
...

It's tracked in issue #2440

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 7d96d3f
Log 3391

Reports 3391

@dblock dblock requested a review from andrross March 15, 2022 15:49
@andrross andrross removed their request for review March 15, 2022 19:14
@kotwanikunal kotwanikunal self-assigned this Mar 15, 2022
@kotwanikunal kotwanikunal self-requested a review March 15, 2022 20:49
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 82ec6a0
Log 3428

Reports 3428

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 975501f
Log 3431

Reports 3431

@tlfeng
Copy link
Collaborator Author

tlfeng commented Mar 16, 2022

In log 3431:

> Task :qa:remote-clusters:integTest
REPRODUCE WITH: ./gradlew ':qa:remote-clusters:integTest' --tests "org.opensearch.cluster.remote.test.RemoteClustersIT.testHAProxyModeConnectionWorks" -Dtests.seed=EA345535C521FDAD -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=tr-TR -Dtests.timezone=Europe/Moscow -Druntime.java=17

org.opensearch.cluster.remote.test.RemoteClustersIT > testHAProxyModeConnectionWorks FAILED
    java.lang.AssertionError
        at __randomizedtesting.SeedInfo.seed([EA345535C521FDAD:ED4280FEFEA78BF0]:0)
        at org.junit.Assert.fail(Assert.java:87)
        at org.junit.Assert.assertTrue(Assert.java:42)
        at org.junit.Assert.assertTrue(Assert.java:53)
        at org.opensearch.cluster.remote.test.RemoteClustersIT.testHAProxyModeConnectionWorks(RemoteClustersIT.java:125)
...

It's reported in issue #1703

Tianli Feng added 3 commits March 16, 2022 11:49
…ter-node

Signed-off-by: Tianli Feng <[email protected]>

# Conflicts:
#	test/framework/src/main/java/org/opensearch/test/InternalTestCluster.java
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 1afb92b
Log 3457

Reports 3457

Tianli Feng added 2 commits March 16, 2022 16:52
…ster_nodes into an error message of BootstrapChecks

Signed-off-by: Tianli Feng <[email protected]>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 2ee85da
Log 3466

Reports 3466

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 7fc7c62
Log 3476

Reports 3476

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success bd7fdbe
Log 3477

Reports 3477

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation pending Tracks issues which have PRs merged but documentation changes pending enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants