diff --git a/integration_tests.py b/integration_tests.py index 213bf376886..34961ac080d 100755 --- a/integration_tests.py +++ b/integration_tests.py @@ -228,11 +228,28 @@ def prepare_environment( typer.secho("Running docker-compose to create containers", fg=c.GREEN) with _gen_docker_compose(modules) as docker_compose_fn: - subprocess.run( - ["docker", "compose", "-f", docker_compose_fn, "up", "-d"], - check=True, - env=docker_compose_env, - ) + try: + subprocess.run( + ["docker", "compose", "-f", docker_compose_fn, "up", "-d"], + check=True, + env=docker_compose_env, + ) + except subprocess.CalledProcessError: + typer.secho( + "docker compose up failed, dumping container logs for diagnosis", + fg=c.RED, + ) + subprocess.run( + ["docker", "compose", "-f", docker_compose_fn, "ps", "-a"], + check=False, + env=docker_compose_env, + ) + subprocess.run( + ["docker", "compose", "-f", docker_compose_fn, "logs", "--no-color"], + check=False, + env=docker_compose_env, + ) + raise typer.secho("Creating users in server and client containers", fg=c.GREEN) for container_name in ["server", "client"]: diff --git a/tests/CI/envs/opensearchproject/opensearch:2.1.0.env b/tests/CI/envs/opensearchproject/opensearch:2.1.0.env index 533442a1d01..5fac49aa91e 100644 --- a/tests/CI/envs/opensearchproject/opensearch:2.1.0.env +++ b/tests/CI/envs/opensearchproject/opensearch:2.1.0.env @@ -6,4 +6,6 @@ cluster.routing.allocation.disk.watermark.high=300mb plugins.security.disabled=true # Elasticsearch allocates 1GB of memory by default. As resources are limited # and elasticsearch performance isn't critical in CI, limit this to 256MB -OPENSEARCH_JAVA_OPTS="-Xms256m -Xmx256m" # minimum and maximum Java heap size +# -XX:-UseContainerSupport works around a JDK cgroup v2 NPE in OpenSearch 2.1.0 +# (ProcessProbe crashes on newer GitHub runners with cgroup v2) +OPENSEARCH_JAVA_OPTS="-Xms256m -Xmx256m -XX:-UseContainerSupport" diff --git a/tests/Jenkins/utilities.sh b/tests/Jenkins/utilities.sh index c25f4e0dfaf..535df210475 100644 --- a/tests/Jenkins/utilities.sh +++ b/tests/Jenkins/utilities.sh @@ -255,8 +255,9 @@ installDIRAC() { if [[ -n "${INSTALLATION_BRANCH}" ]]; then # Use this for (e.g.) running backward-compatibility tests - echo "pip-installing DIRAC from git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]" - pip install "git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}#egg=DIRAC[client]" + dirac_spec="DIRAC[client] @ git+https://github.com/DIRACGrid/DIRAC.git@${INSTALLATION_BRANCH}" + echo "pip-installing DIRAC from $dirac_spec" + pip install "$dirac_spec" else for module_path in "${ALTERNATIVE_MODULES[@]}"; do pip install ${PIP_INSTALL_EXTRA_ARGS:-} "${module_path}"