-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
simplify ./gradlew run-ccs #89711
simplify ./gradlew run-ccs #89711
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,16 +35,12 @@ public class RunTask extends DefaultTestClustersTask { | |
|
||
private Boolean debug = false; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all changes are part of the revert |
||
private Boolean initOnly = false; | ||
|
||
private Boolean preserveData = false; | ||
|
||
private Path dataDir = null; | ||
|
||
private String keystorePassword = ""; | ||
|
||
private Integer offset = 0; | ||
|
||
@Option(option = "debug-jvm", description = "Enable debugging configuration, to allow attaching a debugger to elasticsearch.") | ||
public void setDebug(boolean enabled) { | ||
this.debug = enabled; | ||
|
@@ -90,36 +86,10 @@ public String getDataDir() { | |
return dataDir.toString(); | ||
} | ||
|
||
@Input | ||
@Optional | ||
Boolean getInitOnly() { | ||
return initOnly; | ||
} | ||
|
||
/** | ||
* Only initialize, but don't actually run. This is useful for multi-cluster run tasks. | ||
*/ | ||
public void setInitOnly(Boolean initOnly) { | ||
this.initOnly = initOnly; | ||
} | ||
|
||
@Input | ||
@Optional | ||
public Integer getPortOffset() { | ||
return offset; | ||
} | ||
|
||
/** | ||
* Manually increase the port offset. This is useful for multi-cluster run tasks. | ||
*/ | ||
public void setPortOffset(Integer offset) { | ||
this.offset = offset; | ||
} | ||
|
||
@Override | ||
public void beforeStart() { | ||
int httpPort = 9200 + offset; | ||
int transportPort = 9300 + offset; | ||
int httpPort = 9200; | ||
int transportPort = 9300; | ||
Map<String, String> additionalSettings = System.getProperties() | ||
.entrySet() | ||
.stream() | ||
|
@@ -153,15 +123,12 @@ public void beforeStart() { | |
} | ||
} | ||
if (debug) { | ||
enableDebug(getPortOffset()); | ||
enableDebug(); | ||
} | ||
} | ||
|
||
@TaskAction | ||
public void runAndWait() throws IOException { | ||
if (initOnly) { | ||
return; | ||
} | ||
List<BufferedReader> toRead = new ArrayList<>(); | ||
List<BooleanSupplier> aliveChecks = new ArrayList<>(); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,7 +104,7 @@ public WorkResult delete(Object... objects) { | |
@Override | ||
public void beforeStart() { | ||
if (debugServer) { | ||
enableDebug(0); | ||
enableDebug(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. part of the revert |
||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,8 @@ default void useCluster(Provider<ElasticsearchCluster> cluster) { | |
|
||
default void beforeStart() {} | ||
|
||
default void enableDebug(int portOffset) { | ||
int debugPort = 5007 + portOffset; | ||
default void enableDebug() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. part of the revert |
||
int debugPort = 5007; | ||
for (ElasticsearchCluster cluster : getClusters()) { | ||
for (ElasticsearchNode node : cluster.getNodes()) { | ||
getLogger().lifecycle("Running elasticsearch in debug mode, {} expecting running debug server on port {}", node, debugPort); | ||
|
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.
this is the main change. specifically calling .restart() to update the configuration on disk