-
Notifications
You must be signed in to change notification settings - Fork 25.2k
DISCOVERY: Fix RollingUpgradeTests #35375
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
Conversation
* Don't manually manage min master nodes * Remove some dead code * Closes elastic#35178
Pinging @elastic/es-distributed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Just a few minor nits.
* A closure to call which returns a manually supplied list of unicast seed hosts. | ||
*/ | ||
@Input | ||
Closure<List<String>> manualSeedUris = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about otherUnicastHostAddresses
(they're not really URIs, and "seed" isn't quite the right word either)
List<String> manualSeedUris = node.config.manualSeedUris.call() | ||
if (manualSeedUris.empty == false) { | ||
unicastHosts.addAll(manualSeedUris) | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the unicast hosts file should be the union of these, so no need for the else
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I agree, unfortunately this forces us to manually set min master nodes (just tried it out). The reason being that the nodes that we have join the cluster effectively think they're in a 1 node cluster => if we add the node itself to the unicast hosts here it blows up => I'll add the min master nodes setting back but set it to 2
maybe so it's more realistic + make it merge the lists here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still drop the min master node setting for the initial oldCluster
though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bah of course, it's a different cluster from Gradle's point of view, so yes we need to set minimum_master_nodes
on the new nodes.
I'm surprised that adding the node to its own unicast hosts list makes a difference, I think this would be broken either way:
elasticsearch/server/src/main/java/org/elasticsearch/discovery/zen/UnicastZenPing.java
Lines 213 to 214 in 93c2c60
// no point in pinging ourselves | |
if (localAddresses.contains(address) == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm it did work when I ran it locally :D but yea, set them to 2
now on the 1 node "clusters" and it passed fine locally.
qa/rolling-upgrade/build.gradle
Outdated
@@ -77,8 +76,7 @@ for (Version version : bwcVersions.wireCompatible) { | |||
configure(extensions.findByName("${baseName}#${name}")) { | |||
dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" | |||
clusterName = 'rolling-upgrade' | |||
unicastTransportUri = { seedNode, node, ant -> unicastSeed() } | |||
minimumMasterNodes = { 3 } | |||
manualSeedUris = { unicastSeed() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would prefer to avoid Seed
(in unicastSeed
) here 🌱
@@ -58,8 +54,7 @@ for (Version version : bwcVersions.wireCompatible) { | |||
configure(extensions.findByName("${baseName}#${name}")) { | |||
dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" | |||
clusterName = 'rolling-upgrade-basic' | |||
unicastTransportUri = { seedNode, node, ant -> unicastSeed() } | |||
minimumMasterNodes = { 3 } | |||
manualSeedUris = { unicastSeed() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would prefer to avoid Seed
(in unicastSeed
) here 🌱
@@ -188,8 +186,7 @@ subprojects { | |||
dependsOn lastRunner, "${baseName}#oldClusterTestCluster#node${stopNode}.stop" | |||
setupCommand 'setupTestUser', 'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser' | |||
clusterName = 'rolling-upgrade' | |||
unicastTransportUri = { seedNode, node, ant -> unicastSeed() } | |||
minimumMasterNodes = { 3 } | |||
manualSeedUris = { unicastSeed() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would prefer to avoid Seed
(in unicastSeed
) here 🌱
@DaveCTurner Thanks for the review! => All suggestions applied (see me comment on the min master nodes though). |
Except for the ones about losing |
@DaveCTurner ah sure will rename to |
@DaveCTurner renamed to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @original-brownbear.
Jenkins test this |
@DaveCTurner thanks for the review! |
* The logic that splits by `","` isn't necessary anymore since elastic#35375 removed the hack that set the comma separated list for the unicast host
* The logic that splits by `","` isn't necessary anymore since #35375 removed the hack that set the comma separated list for the unicast host
* DISCOVERY: Fix RollingUpgradeTests * Don't manually manage min master nodes if not necessary * Remove some dead code * Allow for manually supplying list of seed nodes * Closes elastic#35178
* DISCOVERY: Fix RollingUpgradeTests * Don't manually manage min master nodes if not necessary * Remove some dead code * Allow for manually supplying list of seed nodes * Closes #35178
6.5
and newer so I don't think we have to do anything about that here.