From 895deb89e6313bf82e3a0ec8e74f3b13407bc1bc Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Fri, 5 Mar 2021 18:29:39 -0500 Subject: [PATCH] Install ACL package for Solr Docker tests Github action (#2463) ACL is no longer provided by default in Ubuntu 20.04 Other changes: - Made tests easier to debug - Removed two inconsequential lines from the Dockerfile --- .github/workflows/docker-test.yml | 2 ++ solr/docker/Dockerfile | 2 -- solr/docker/build.gradle | 2 +- .../tests/cases/empty-varsolr-vol-ramdomuser-rootgroup/test.sh | 2 +- solr/docker/tests/shared.sh | 3 ++- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index d331df9e86f..952089fa81a 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -28,6 +28,8 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 + - name: Install ACL + run: sudo apt-get install acl - name: Grant execute permission for gradlew run: chmod +x gradlew - uses: actions/cache@v2 diff --git a/solr/docker/Dockerfile b/solr/docker/Dockerfile index d1a0db17587..9d82c367523 100644 --- a/solr/docker/Dockerfile +++ b/solr/docker/Dockerfile @@ -64,8 +64,6 @@ RUN set -ex; \ mv /opt/solr/bin/solr.in.cmd /opt/solr/bin/solr.in.cmd.orig; \ chmod 0664 /etc/default/solr.in.sh; \ mkdir -p -m0770 /var/solr; \ - sed -i -e "s/\"\$(whoami)\" == \"root\"/\$(id -u) == 0/" /opt/solr/bin/solr; \ - sed -i -e 's/lsof -PniTCP:/lsof -t -PniTCP:/' /opt/solr/bin/solr; \ chown -R "$SOLR_USER:0" /var/solr; VOLUME /var/solr diff --git a/solr/docker/build.gradle b/solr/docker/build.gradle index 6b7e21439d3..305a50d62c2 100644 --- a/solr/docker/build.gradle +++ b/solr/docker/build.gradle @@ -200,4 +200,4 @@ task dockerPush(dependsOn: tasks.dockerTag) { // One task to build and tag a Solr docker image task docker { dependsOn tasks.dockerBuild, tasks.dockerTag -} \ No newline at end of file +} diff --git a/solr/docker/tests/cases/empty-varsolr-vol-ramdomuser-rootgroup/test.sh b/solr/docker/tests/cases/empty-varsolr-vol-ramdomuser-rootgroup/test.sh index 826e297ac51..5ae4ca00b5f 100755 --- a/solr/docker/tests/cases/empty-varsolr-vol-ramdomuser-rootgroup/test.sh +++ b/solr/docker/tests/cases/empty-varsolr-vol-ramdomuser-rootgroup/test.sh @@ -16,7 +16,7 @@ docker volume create "$myvarsolr" echo "Running $container_name" docker run \ - --user 777:0 \ + --user 7777:0 \ -v "$myvarsolr:/var/solr" \ --name "$container_name" \ -d "$tag" solr-precreate getting-started diff --git a/solr/docker/tests/shared.sh b/solr/docker/tests/shared.sh index 0537db76fa7..6b4e211fed2 100755 --- a/solr/docker/tests/shared.sh +++ b/solr/docker/tests/shared.sh @@ -55,6 +55,7 @@ function wait_for_server_started { while true; do docker logs "$container_name" > "${log}" 2>&1 if grep -E -q '(o\.e\.j\.s\.Server Started|Started SocketConnector)' "${log}" ; then + docker logs "$container_name" break fi @@ -130,4 +131,4 @@ echo "Test logs and build files can be found at: ${BUILD_DIR}" container_name="test-$(echo "${TEST_NAME}" | tr ':/-' '_')-$(echo "${tag}" | tr ':/-' '_')" echo "Cleaning up left-over containers from previous runs" -container_cleanup "${container_name}" \ No newline at end of file +container_cleanup "${container_name}"