From ffc6a14755f5f715d93cdbd61062d13e74d7dec3 Mon Sep 17 00:00:00 2001 From: Rory Hunter Date: Mon, 18 Jul 2022 09:28:49 +0100 Subject: [PATCH] Revert "Fix passing positional args to ES in Docker (#88502)" This reverts commit 9f4b32a20a776ff6c888e0534f176559c63be700. --- .../docker/src/docker/bin/docker-entrypoint.sh | 2 +- docs/changelog/88502.yaml | 5 ----- .../elasticsearch/packaging/test/DockerTests.java | 14 +------------- .../packaging/util/docker/DockerRun.java | 8 -------- 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 docs/changelog/88502.yaml diff --git a/distribution/docker/src/docker/bin/docker-entrypoint.sh b/distribution/docker/src/docker/bin/docker-entrypoint.sh index d7b41b81bb7e3..8ea9fcb2c0f86 100755 --- a/distribution/docker/src/docker/bin/docker-entrypoint.sh +++ b/distribution/docker/src/docker/bin/docker-entrypoint.sh @@ -81,4 +81,4 @@ fi # Signal forwarding and child reaping is handled by `tini`, which is the # actual entrypoint of the container -exec /usr/share/elasticsearch/bin/elasticsearch "$@" $POSITIONAL_PARAMETERS <<<"$KEYSTORE_PASSWORD" +exec /usr/share/elasticsearch/bin/elasticsearch $POSITIONAL_PARAMETERS <<<"$KEYSTORE_PASSWORD" diff --git a/docs/changelog/88502.yaml b/docs/changelog/88502.yaml deleted file mode 100644 index f3e21006bd6ac..0000000000000 --- a/docs/changelog/88502.yaml +++ /dev/null @@ -1,5 +0,0 @@ -pr: 88502 -summary: Fix passing positional args to ES in Docker -area: Packaging -type: bug -issues: [] diff --git a/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java b/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java index 1c006b3b563f2..0b4b48f8b87ea 100644 --- a/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java +++ b/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java @@ -1096,18 +1096,6 @@ public void test170DefaultShellIsBash() { } } - /** - * Ensure that it is possible to apply CLI options when running the image. - */ - public void test171AdditionalCliOptionsAreForwarded() throws Exception { - runContainer(distribution(), builder().runArgs("bin/elasticsearch", "-Ecluster.name=kimchy").envVar("ELASTIC_PASSWORD", PASSWORD)); - waitForElasticsearch(installation, "elastic", PASSWORD); - - final JsonNode node = getJson("/", "elastic", PASSWORD, ServerUtils.getCaCert(installation)); - - assertThat(node.get("cluster_name").textValue(), equalTo("kimchy")); - } - /** * Check that the UBI images has the correct license information in the correct place. */ @@ -1205,7 +1193,7 @@ private List listPlugins() { /** * Check that readiness listener works */ - public void test500Readiness() throws Exception { + public void testReadiness001() throws Exception { assertFalse(readinessProbe(9399)); // Disabling security so we wait for green installation = runContainer( diff --git a/qa/os/src/test/java/org/elasticsearch/packaging/util/docker/DockerRun.java b/qa/os/src/test/java/org/elasticsearch/packaging/util/docker/DockerRun.java index feb95b5eb2d93..caae6e2635c0f 100644 --- a/qa/os/src/test/java/org/elasticsearch/packaging/util/docker/DockerRun.java +++ b/qa/os/src/test/java/org/elasticsearch/packaging/util/docker/DockerRun.java @@ -34,7 +34,6 @@ public class DockerRun { private Integer uid; private Integer gid; private final List extraArgs = new ArrayList<>(); - private final List runArgs = new ArrayList<>(); private String memory = "2g"; // default to 2g memory limit private DockerRun() {} @@ -96,11 +95,6 @@ public DockerRun extraArgs(String... args) { return this; } - public DockerRun runArgs(String... args) { - Collections.addAll(this.runArgs, args); - return this; - } - String build() { final List cmd = new ArrayList<>(); @@ -150,8 +144,6 @@ String build() { // Image name cmd.add(getImageName(distribution)); - cmd.addAll(this.runArgs); - return String.join(" ", cmd); }