Skip to content

Commit

Permalink
Remove duplicated definitions of random volumes (apache#36993)
Browse files Browse the repository at this point in the history
Docker Compose 2.24 started to error out on duplicated (but
otherwise identical) volume definitions coming from multiple
docker compose files. We had urandom volume defined not only in
base yaml but also in all the backend and integration yaml files
which new docker compose does not like (and I agree with it).

That resulted with error:

``services.airflow.volumes array items[0,2] must be unique``

This PR removes the duplicated volume definitions, as side effect
it makes our docker compose files cleaner.
  • Loading branch information
potiuk authored Jan 24, 2024
1 parent 396402d commit 390eacb
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/backend-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ services:
- MYSQL_DATABASE=airflow
volumes:
- ../mysql/conf.d:/etc/mysql/conf.d:ro
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- mysql-db-volume:/var/lib/mysql
healthcheck:
test: ["CMD", "mysql", "-h", "localhost", "-P", "3306", "-u", "root", "-e", "SELECT 1"]
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/docker-compose/backend-none.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ services:
environment:
- BACKEND=none
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=none-backend://
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/backend-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ services:
- POSTGRES_DB=airflow
- POSTGRES_HOST_AUTH_METHOD=password
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "psql", "-h", "localhost", "-U", "postgres", "-c", "select 1", "airflow"]
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/docker-compose/backend-sqlite-no-volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ services:
environment:
- BACKEND=sqlite
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=${SQLITE_URL}
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/backend-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ services:
- BACKEND=sqlite
- AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=${SQLITE_URL}
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- sqlite-db-volume:/root/airflow/sqlite
volumes:
sqlite-db-volume:
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/integration-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ services:
HEAP_NEWSIZE: 128M
MAX_HEAP_SIZE: 256M
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- cassandra-db-volume:/var/lib/cassandra
healthcheck:
# We use IPv6 variant of the check to workaround the problem with 3.0.26 version
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/docker-compose/integration-celery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:
labels:
breeze.description: "Integration required for Celery executor tests."
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- rabbitmq-db-volume:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
Expand All @@ -33,7 +32,6 @@ services:
redis:
image: redis:5.0.1
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- redis-db-volume:/data/redis
ports:
- "${REDIS_HOST_PORT}:6379"
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/integration-kerberos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ services:

volumes:
- kerberos-keytabs:/root/kerberos-keytabs
- /dev/urandom:/dev/random # Required to get non-blocking entropy source

environment:
- KRB5_TRACE=/dev/stderr
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/integration-mongo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ services:
labels:
breeze.description: "Integration required for MongoDB hooks."
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- mongo-db-volume:/data/db
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo localhost:27017/test --quiet
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci/docker-compose/integration-pinot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ services:
breeze.description: "Integration required for Apache Pinot hooks."
ports:
- "9080:9080"
volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
command: QuickStart -type batch
healthcheck:
test: curl -f http://localhost:8000/health
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/docker-compose/integration-trino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ services:
- "37778-37786:7778"

volumes:
- /dev/urandom:/dev/random # Required to get non-blocking entropy source
- ../dockerfiles/krb5-kdc-server/krb5.conf:/etc/krb5.conf:ro
- trino-db-volume:/data/trino
- kerberos-keytabs:/home/trino/kerberos-keytabs
Expand Down

0 comments on commit 390eacb

Please sign in to comment.