diff --git a/cassandra_nodetool/tests/compose/config/Dockerfile b/cassandra_nodetool/tests/compose/config/Dockerfile index 95cf03814d829..1c1a5cda2372b 100644 --- a/cassandra_nodetool/tests/compose/config/Dockerfile +++ b/cassandra_nodetool/tests/compose/config/Dockerfile @@ -1,4 +1,4 @@ -ARG CASSANDRA_VERSION +ARG CASSANDRA_VERSION=2.1.14 FROM cassandra:${CASSANDRA_VERSION} COPY jmxremote.password /etc/cassandra/jmxremote.password RUN chown cassandra:cassandra /etc/cassandra/jmxremote.password diff --git a/cassandra_nodetool/tests/conftest.py b/cassandra_nodetool/tests/conftest.py index 445e4f2303b9a..98e544bcf74b5 100644 --- a/cassandra_nodetool/tests/conftest.py +++ b/cassandra_nodetool/tests/conftest.py @@ -36,6 +36,20 @@ def dd_environment(): else: log_patterns = ['Starting listening for CQL clients', 'All sessions completed'] + # Workaround for Docker 29.1.x issues with old images + # 1. Pre-pull base image with explicit platform to avoid multi-arch issues + subprocess.run( + ['docker', 'pull', '--platform', 'linux/amd64', f"cassandra:{env['CASSANDRA_VERSION']}"], + check=False, # Don't fail if pull has issues, let build try + capture_output=True, + ) + + # 2. Disable BuildKit to use legacy builder (BuildKit has cache validation bug) + env['DOCKER_BUILDKIT'] = '0' + + # 3. Force legacy builder to use specific platform + env['DOCKER_DEFAULT_PLATFORM'] = 'linux/amd64' + with docker_run( compose_file, service_name=common.CASSANDRA_CONTAINER_NAME,