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

[Remove] Deprecated Zen1 Discovery #1216

Merged
merged 3 commits into from
Dec 3, 2021

Conversation

nknize
Copy link
Collaborator

@nknize nknize commented Sep 3, 2021

Zen1 discovery was deprecated in Legacy 7.x for eventual removal. OpenSearch 1.x
carries this deprecation. This PR completely removes all support for Zen1
discovery in favor of Zen2 in the 2.x versioning line.

@nknize
Copy link
Collaborator Author

nknize commented Sep 3, 2021

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success ec3fc8607114d82a4b7e93e3599a7d051d020c68

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed ec3fc8607114d82a4b7e93e3599a7d051d020c68

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success ec3fc8607114d82a4b7e93e3599a7d051d020c68

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success ec3fc8607114d82a4b7e93e3599a7d051d020c68
Log 490

Reports 490

@nknize
Copy link
Collaborator Author

nknize commented Sep 6, 2021

start gradle check

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure ed8702c61348985dbf84843b57120b07725b73a8
Log 492

Reports 492

@nknize
Copy link
Collaborator Author

nknize commented Sep 6, 2021

Jenkins flakiness...

./gradlew :qa:full-cluster-restart:v1.1.0#oldClusterTest -Dtests.seed=B5D94F8B26901B69
» [2021-09-06T18:53:58.574874Z] [BUILD] Starting OpenSearch process
» [2021-09-06T18:54:02,473][INFO ][o.o.n.Node               ] [v1.1.0-1] version[1.1.0-SNAPSHOT], pid[248346], build[tar/ba9c8c08446b51bd3b6f9dacdecea149478b0ed2/2021-09-06T18:43:08.660107Z], OS[Linux/5.4.0-1045-aws/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/15.0.1/15.0.1+9]
» [2021-09-06T18:54:02,481][INFO ][o.o.n.Node               ] [v1.1.0-1] JVM home [/var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/distribution/bwc/minor/build/bwc/checkout-1.x/distribution/archives/linux-tar/build/install/opensearch-1.1.0-SNAPSHOT/jdk], using bundled JDK [true]
» [2021-09-06T18:54:02,482][INFO ][o.o.n.Node               ] [v1.1.0-1] JVM arguments [-Xshare:auto, -Dopensearch.networkaddress.cache.ttl=60, -Dopensearch.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.io.tmpdir=/var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/qa/full-cluster-restart/build/testclusters/v1.1.0-1/tmp, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=logs, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms512m, -Xmx512m, -ea, -esa, -XX:TieredStopAtLevel=1, -XX:MaxDirectMemorySize=268435456, -Dopensearch.path.home=/var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/distribution/bwc/minor/build/bwc/checkout-1.x/distribution/archives/linux-tar/build/install/opensearch-1.1.0-SNAPSHOT, -Dopensearch.path.conf=/var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/qa/full-cluster-restart/build/testclusters/v1.1.0-1/config, -Dopensearch.distribution.type=tar, -Dopensearch.bundled_jdk=true]
» [2021-09-06T18:54:07,155][INFO ][o.o.i.r.ReindexPlugin    ] [v1.1.0-1] ReindexPlugin reloadSPI called
» [2021-09-06T18:54:07,167][INFO ][o.o.i.r.ReindexPlugin    ] [v1.1.0-1] Unable to find any implementation for RemoteReindexExtension
...
> Task :qa:full-cluster-restart:v1.1.0#oldClusterTest FAILED

Unable to reproduce:

BUILD SUCCESSFUL in 3m 10s
161 actionable tasks: 8 executed, 153 up-to-date

Restarting check...

@nknize
Copy link
Collaborator Author

nknize commented Sep 6, 2021

start gradle check

@nknize
Copy link
Collaborator Author

nknize commented Sep 6, 2021

More link checker flakiness...

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success ed8702c61348985dbf84843b57120b07725b73a8
Log 493

Reports 493

@opensearch-ci-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

✅   DCO Check Passed ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success ed8702c61348985dbf84843b57120b07725b73a8

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 21ae020f92f3655280be614aef2c920446fe6330

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 21ae020f92f3655280be614aef2c920446fe6330

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 21ae020f92f3655280be614aef2c920446fe6330
Log 1308

Reports 1308

Zen1 discovery was deprecated in Legacy 7.x for eventual removal. OpenSearch 1.x
carries this deprecation. This commit completely removes all support for Zen1
discovery in favor of Zen2.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 47ee204

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 47ee204

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 47ee204
Log 1309

Reports 1309

@nknize
Copy link
Collaborator Author

nknize commented Dec 3, 2021

@opensearch-project/opensearch-core this is ready for review if anyone wants to have a look. Full zen1 removal which was deprecated in the fork.

Copy link
Contributor

@adnapibar adnapibar left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks Nick!
Just a couple of comments. I also see a few more references of zen1, but I guess we can clean those up in a subsequent PR.

@@ -670,10 +660,6 @@ void becomeCandidate(String method) {
peerFinder.activate(coordinationState.get().getLastAcceptedState().nodes());
clusterFormationFailureHelper.start();

if (getCurrentTerm() == ZEN1_BWC_TERM) {
Copy link
Contributor

@adnapibar adnapibar Dec 3, 2021

Choose a reason for hiding this comment

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

Should we be completely removing this constant ? It's used here as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch... pushing additional commit to remove all remaining references

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing caused a node join failure so I'll take care of that in a follow up to isolate the issue.

Failing test:

./gradlew ':server:test' --tests "org.opensearch.node.NodeTests.testCloseOnLeakedIndexReaderReference" -Dtests.seed=47F5C424B97CB691 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=fr-BE -Dtests.timezone=Africa/Maputo -Druntime.java=17

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success d858ffa5f50a3e525bb1d46eda1f385a7f28a832

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 602ef840a4948083c353f72b63b1fd6fac3e16c1

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Precommit failure d858ffa5f50a3e525bb1d46eda1f385a7f28a832
Log 1693

@nknize nknize requested a review from adnapibar December 3, 2021 17:04
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 602ef840a4948083c353f72b63b1fd6fac3e16c1

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure d858ffa5f50a3e525bb1d46eda1f385a7f28a832
Log 1316

Reports 1316

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 602ef840a4948083c353f72b63b1fd6fac3e16c1
Log 1317

Reports 1317

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success 18324ac

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success 18324ac

@@ -293,6 +292,11 @@
}, Setting.Property.NodeScope);

private static final String CLIENT_TYPE = "node";
public static final Setting<TimeValue> INITIAL_STATE_TIMEOUT_SETTING = Setting.positiveTimeSetting(
Copy link
Collaborator

@reta reta Dec 3, 2021

Choose a reason for hiding this comment

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

That looks a bit off: why discovery setting on node? May be it is better keep old DiscoverySettings class with this single setting (for now)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a NodeScope setting refactored from DiscoverySettings and the only remaining setting for node discovery so I think it's appropriately refactored here to node level without the overhead of an inner class?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, should have been more clear, NodeScope is totally fine, I think the pretty useful convention we have is that that Node settings are prefixed with node., Search settings with search., Index settings with index., the overhead of inner class is super minimal but it would be just natural to look for discovery. under Discovery - related classes, just my two cents.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oic what you're saying. API wise? sure we can make a public inner class. And I think "overhead" should be 1:1? Instead of loading DiscoverySettings.class (which is now removed) we're adding a new Node$DiscoverySettings.class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 I refactored DiscoverySettings as an internal class to Node. I think that's a nice clean suggestion.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you @nknize !

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 18324ac
Log 1318

Reports 1318

…rnal class

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Wrapper Validation success a6f36a2

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Precommit success a6f36a2

@@ -294,6 +293,14 @@

private static final String CLIENT_TYPE = "node";

public static class DiscoverySettings {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success a6f36a2
Log 1320

Reports 1320

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants