Skip to content

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

Merged
merged 7 commits into from
Nov 9, 2018

Conversation

original-brownbear
Copy link
Contributor

  • Don't manually manage min master nodes
  • Regarding the issue asking to use file based discovery: This already happens. We are passing the transportURIs in a hacky way via the node property and they are written to the discovery file in 6.5 and newer so I don't think we have to do anything about that here.
  • Remove some dead code
  • Closes Fix discovery in rolling upgrade tests #35178

* Don't manually manage min master nodes
* Remove some dead code
* Closes elastic#35178
@original-brownbear original-brownbear added >non-issue v7.0.0 :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v6.5.0 labels Nov 8, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

Copy link
Contributor

@DaveCTurner DaveCTurner left a 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 = {
Copy link
Contributor

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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 :)

Copy link
Contributor

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:

// no point in pinging ourselves
if (localAddresses.contains(address) == false) {

Copy link
Contributor Author

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.

@@ -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() }
Copy link
Contributor

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() }
Copy link
Contributor

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() }
Copy link
Contributor

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 🌱

@original-brownbear
Copy link
Contributor Author

@DaveCTurner Thanks for the review! => All suggestions applied (see me comment on the min master nodes though).

@DaveCTurner
Copy link
Contributor

All suggestions applied

Except for the ones about losing Seed from unicastSeed. How about getOtherUnicastHostAddresses?

@original-brownbear
Copy link
Contributor Author

@DaveCTurner ah sure will rename to getOtherUnicastHostAddresses (sorry missed that one since it was named like that before) as well.

@original-brownbear
Copy link
Contributor Author

@DaveCTurner renamed to getOtherUnicastHostAddresses :)

Copy link
Contributor

@DaveCTurner DaveCTurner 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 @original-brownbear.

@original-brownbear
Copy link
Contributor Author

Jenkins test this

@original-brownbear
Copy link
Contributor Author

@DaveCTurner thanks for the review!

@original-brownbear original-brownbear merged commit 529910a into elastic:master Nov 9, 2018
@original-brownbear original-brownbear deleted the 35178-2 branch November 9, 2018 09:47
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Nov 13, 2018
*  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
original-brownbear added a commit that referenced this pull request Nov 13, 2018
*  The logic that splits by `","` isn't necessary anymore since #35375 removed the hack that set the comma separated list for the unicast host
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Nov 14, 2018
* 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
original-brownbear added a commit that referenced this pull request Nov 15, 2018
* 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
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >non-issue v6.5.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants