Skip to content

Commit 8cb9f55

Browse files
committed
Merge remote-tracking branch 'origin/master' into upgrade-azure-sdk-returns
2 parents aa99984 + 4b2ef7a commit 8cb9f55

File tree

18 files changed

+506
-131
lines changed

18 files changed

+506
-131
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditPrecommitPlugin.java

+1-8
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public TaskProvider<? extends Task> createTask(Project project) {
4848
TaskProvider<ThirdPartyAuditTask> audit = project.getTasks().register("thirdPartyAudit", ThirdPartyAuditTask.class);
4949
// usually only one task is created. but this construct makes our integTests easier to setup
5050
project.getTasks().withType(ThirdPartyAuditTask.class).configureEach(t -> {
51-
Configuration runtimeConfiguration = getRuntimeConfiguration(project);
51+
Configuration runtimeConfiguration = project.getConfigurations().getByName("runtimeClasspath");
5252
Configuration compileOnly = project.getConfigurations()
5353
.getByName(CompileOnlyResolvePlugin.RESOLVEABLE_COMPILE_ONLY_CONFIGURATION_NAME);
5454
t.setClasspath(runtimeConfiguration.plus(compileOnly));
@@ -68,11 +68,4 @@ public TaskProvider<? extends Task> createTask(Project project) {
6868
return audit;
6969
}
7070

71-
private Configuration getRuntimeConfiguration(Project project) {
72-
Configuration runtime = project.getConfigurations().findByName("runtimeClasspath");
73-
if (runtime == null) {
74-
return project.getConfigurations().getByName("testCompileClasspath");
75-
}
76-
return runtime;
77-
}
7871
}

build-tools/build.gradle

+1-64
Original file line numberDiff line numberDiff line change
@@ -154,67 +154,4 @@ normalization {
154154
}
155155
}
156156

157-
tasks.named("check").configure { dependsOn("integTest") }
158-
159-
// TODO These additional conventions will be applied once those plugins have been ported to build-conventions and
160-
//
161-
// apply plugin: 'elasticsearch.build'
162-
//
163-
// // groovydoc succeeds, but has some weird internal exception...
164-
// tasks.named("groovydoc").configure {
165-
// enabled = false
166-
// }
167-
//
168-
// // build-tools is not ready for primetime with these...
169-
// tasks.named("dependencyLicenses").configure { enabled = false }
170-
// tasks.named("dependenciesInfo").configure {enabled = false }
171-
// tasks.named("dependenciesGraph").configure {enabled = false }
172-
// disableTasks('forbiddenApisMain', 'forbiddenApisTest', 'forbiddenApisIntegTest', 'forbiddenApisTestFixtures')
173-
// tasks.named("jarHell").configure {
174-
// enabled = false
175-
// }
176-
// tasks.named("thirdPartyAudit").configure {
177-
// enabled = false
178-
// }
179-
// configurations.register("distribution")
180-
//
181-
//
182-
// tasks.withType(Test).configureEach {
183-
// // Track reaper jar as a test input using runtime classpath normalization strategy
184-
// inputs.files(configurations.reaper).withNormalizer(ClasspathNormalizer)
185-
// useJUnitPlatform()
186-
// }
187-
//
188-
// tasks.named("test").configure {
189-
// include("**/*TestSpec.class")
190-
// }
191-
//
192-
193-
//
194-
// tasks.named("forbiddenPatterns").configure {
195-
// exclude '**/*.wav'
196-
// exclude '**/*.p12'
197-
// exclude '**/*.jks'
198-
// exclude '**/*.crt'
199-
// // the file that actually defines nocommit
200-
// exclude '**/ForbiddenPatternsTask.java'
201-
// exclude '**/*.bcfks'
202-
// }
203-
//
204-
// eclipse {
205-
// classpath {
206-
// plusConfigurations += [configurations.integTestRuntimeClasspath]
207-
// }
208-
// }
209-
//
210-
// tasks.named("testingConventions") {
211-
// naming.clear()
212-
// naming {
213-
// Tests {
214-
// baseClass 'org.elasticsearch.gradle.internal.test.GradleUnitTestCase'
215-
// }
216-
// TestSpec {
217-
// baseClass 'spock.lang.Specification'
218-
// }
219-
// }
220-
// }
157+
tasks.named("check").configure { dependsOn("integTest") }

build.gradle

-6
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,6 @@ allprojects {
229229
}
230230
}
231231

232-
project.ext.disableTasks = { String... tasknames ->
233-
for (String taskname : tasknames) {
234-
project.tasks.named(taskname).configure { enabled = false }
235-
}
236-
}
237-
238232
/*
239233
* Remove assemble/dependenciesInfo on all qa projects because we don't
240234
* need to publish artifacts for them.

client/rest-high-level/build.gradle

-10
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,6 @@ tasks.named('forbiddenApisMain').configure {
5858
signaturesFiles += files('src/main/resources/forbidden/rest-high-level-signatures.txt')
5959
}
6060

61-
File nodeCert = file("./testnode.crt")
62-
File nodeTrustStore = file("./testnode.jks")
63-
File pkiTrustCert = file("./src/test/resources/org/elasticsearch/client/security/delegate_pki/testRootCA.crt")
64-
65-
def clusterUserNameProvider = providers.systemProperty('tests.rest.cluster.username')
66-
.orElse('test_user')
67-
68-
def clusterPasswordProvider = providers.systemProperty('tests.rest.cluster.password')
69-
.orElse('test-user-password')
70-
7161
tasks.named('splitPackagesAudit').configure {
7262
// the client package should be owned by the client, but server has some classes there too
7363
ignoreClasses 'org.elasticsearch.client.*'

docs/reference/modules/discovery/discovery.asciidoc

+52
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,58 @@ enough masterless master-eligible nodes to complete an election. If neither of
2727
these occur quickly enough then the node will retry after
2828
`discovery.find_peers_interval` which defaults to `1s`.
2929

30+
Once a master is elected, it will normally remain as the elected master until
31+
it is deliberately stopped. It may also stop acting as the master if
32+
<<cluster-fault-detection,fault detection>> determines the cluster to be
33+
faulty. When a node stops being the elected master, it begins the discovery
34+
process again.
35+
36+
[[modules-discovery-troubleshooting]]
37+
==== Troubleshooting discovery
38+
39+
In most cases, the discovery process completes quickly, and the master node
40+
remains elected for a long period of time. If the cluster has no master for
41+
more than a few seconds or the master is unstable, the logs for each node will
42+
contain information explaining why:
43+
44+
* All nodes repeatedly log messages indicating that a master cannot be
45+
discovered or elected using a logger called
46+
`org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper`. By
47+
default, this happens every 10 seconds.
48+
49+
* If a node wins the election, it logs a message containing
50+
`elected-as-master`. If this happens repeatedly, the master node is unstable.
51+
52+
* When a node discovers the master or believes the master to have failed, it
53+
logs a message containing `master node changed`.
54+
55+
* If a node is unable to discover or elect a master for several minutes, it
56+
starts to report additional details about the failures in its logs. Be sure to
57+
capture log messages covering at least five minutes of discovery problems.
58+
59+
If your cluster doesn't have a stable master, many of its features won't work
60+
correctly. The cluster may report many kinds of error to clients and in its
61+
logs. You must fix the master node's instability before addressing these other
62+
issues. It will not be possible to solve any other issues while the master node
63+
is unstable.
64+
65+
The logs from the `ClusterFormationFailureHelper` may indicate that a master
66+
election requires a certain set of nodes and that it has not discovered enough
67+
nodes to form a quorum. If so, you must address the reason preventing {es} from
68+
discovering the missing nodes. The missing nodes are needed to reconstruct the
69+
cluster metadata. Without the cluster metadata, the data in your cluster is
70+
meaningless. The cluster metadata is stored on a subset of the master-eligible
71+
nodes in the cluster. If a quorum cannot be discovered then the missing nodes
72+
were the ones holding the cluster metadata. If you cannot bring the missing
73+
nodes back into the cluster, start a new cluster and restore data from a recent
74+
snapshot. Refer to <<modules-discovery-quorums>> for more information.
75+
76+
The logs from the `ClusterFormationFailureHelper` may also indicate that it has
77+
discovered a possible quorum of master-eligible nodes. If so, the usual reason
78+
that the cluster cannot elect a master is that one of the other nodes cannot
79+
discover a quorum. Inspect the logs on the other master-eligible nodes and
80+
ensure that every node has discovered a quorum.
81+
3082
[[built-in-hosts-providers]]
3183
==== Seed hosts providers
3284

0 commit comments

Comments
 (0)