Force kill testcluster nodes#37353
Merged
alpar-t merged 7 commits intoelastic:masterfrom Feb 18, 2019
Merged
Conversation
Collaborator
|
Pinging @elastic/es-core-infra |
Contributor
Author
|
@elasticmachine run the gradle build tests 1 |
rjernst
reviewed
Jan 23, 2019
| ); | ||
| if (processHandle.isAlive()) { | ||
| processHandle.destroy(); | ||
| if (forcibly) { |
Member
There was a problem hiding this comment.
I think the order of this all can be cleaned up to not have doubling up on waits.
Member
There was a problem hiding this comment.
We're still doing multiple aliveness checks when we already know it is killed. Here is what I was envisioning:
if (processHandle.isAlive() == false) {
logger.info("Process was not running when we tried to terminate it.");
return;
}
// Stop all children first, ES could actually be a child when there's some wrapper process like on Windows.
processHandle.children().forEach(each -> stopHandle(each, forcibly));
logProcessInfo("Terminating elasticsearch process" + (forcibly ? " forcibly " : "gratefully") + ":", processHandle.info());
if (forcibly) {
processHandle.destroyForcibly();
} else {
processHandle.destroy();
waitForProcessToExit(processHandle);
if (processHandle.isAlive()) {
logger.info("process did not terminate after {} {}, stopping it forcefully",
ES_DESTROY_TIMEOUT, ES_DESTROY_TIMEOUT_UNIT);
processHandle.destroyForcibly();
}
}
waitForProcessToExit(processHandle);
if (processHandle.isAlive()) {
throw new TestClustersException("Was not able to terminate elasticsearch process");
}
Contributor
Author
|
@elasticmachine run elasticsearch-ci/1 again |
mark-vieira
approved these changes
Feb 14, 2019
Contributor
mark-vieira
left a comment
There was a problem hiding this comment.
Trivial typo. Otherwise LGTM.
| processHandle.children().forEach(each -> stopHandle(each, forcibly)); | ||
|
|
||
| logProcessInfo( | ||
| "Terminating elasticsearch process" + (forcibly ? " forcibly " : "gratefully") + ":", |
Contributor
There was a problem hiding this comment.
Typo, should be "gracefully". Not say we are not grateful 😉
rjernst
approved these changes
Feb 14, 2019
| } else { | ||
| processHandle.destroy(); | ||
| waitForProcessToExit(processHandle); | ||
| if (processHandle.isAlive()) { |
Member
There was a problem hiding this comment.
We can invert this, so:
if (processHandle.isAlive() == false) {
return
}
logger.info("process did not terminate after {} {}, stopping it forcefully",
ES_DESTROY_TIMEOUT, ES_DESTROY_TIMEOUT_UNIT);
processHandle.destroyForcibly();
alpar-t
added a commit
that referenced
this pull request
Feb 18, 2019
* Force kill testcluster nodes
alpar-t
added a commit
that referenced
this pull request
Feb 18, 2019
* Force kill testcluster nodes
alpar-t
added a commit
that referenced
this pull request
Feb 18, 2019
* Force kill testcluster nodes
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Feb 18, 2019
…ate-file * elastic/master: Remove tests and branches that will never execute (elastic#38772) also check ccr stats api return empty response in ensureNoCcrTasks() Add overlapping, before, after filters to intervals query (elastic#38999) Mute test elastic#38949 Add remote recovery to ShardFollowTaskReplicationTests (elastic#39007) [ML] More advanced post-test cleanup of ML indices (elastic#39049) wait for shard to be allocated before executing a resume follow api Update track-total-hits.asciidoc Force kill testcluster nodes (elastic#37353) Make pullFixture a task dependency of resolveAllDependencies (elastic#38956) set minimum supported version (elastic#39043) Enforce Completion Context Limit (elastic#38675) Mute test Don't close caches while there might still be in-flight requests. (elastic#38958) Fix elastic#38623 remove xpack namespace REST API (elastic#38625) Add data frame feature (elastic#38934) Test bi-directional index following during a rolling upgrade. (elastic#38962) Generate mvn pom for ssl-config library (elastic#39019) Mute testRetentionLeaseIsRenewedDuringRecovery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since we are not reusing them, no point in waiting for a clean stop.