-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
When bootstrapping the Rucio DB with the rucio-init container, the DB is created, but the alembic_version table is not informed. This prevents future upgrades/downgrades of the DB with alembic.
How to reproduce it:
With this docker-compose-init.yml file:
name: dev
services:
rucioinit:
container_name: dev-rucio-init-1
image: "docker.io/rucio/rucio-init:${RUCIO_DEV_PREFIX:-}${RUCIO_TAG:-latest}"
platform: linux/amd64
environment:
- RUCIO_CFG_DATABASE_DEFAULT=postgresql+psycopg://rucio:secret@ruciodb:5432/rucio
depends_on:
ruciodb:
condition: service_healthy
required: false
ruciodb:
container_name: dev-ruciodb-1
image: docker.io/postgres:14
environment:
- POSTGRES_USER=rucio
- POSTGRES_DB=rucio
- POSTGRES_PASSWORD=secret
command: ["-c", "fsync=off","-c", "synchronous_commit=off","-c", "full_page_writes=off"]
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB || exit 1" ]
interval: 10s
timeout: 5s
start_period: 30s
retries: 10
networks:
default:
driver: bridge
# The default Docker network name ends with '_default',
# which is not RFC 2396 compliant (due to the underscore);
# this causes issues with the ActiveMQ library used by FTS.
# To avoid this, the network name must be made RFC 2396 compliant.
name: ${RUCIO_NETWORK_NAME:-ruciodevnetwork}
Run:
RUCIO_TAG=release-38.5.1 docker compose --file etc/docker/dev/init/docker-compose-init.yml up -d
docker exec -it dev-ruciodb-1 psql -U rucio -c "SELECT * from alembic_version"
Forcing release-38.5.1, latest is crashing because of #455.
Sample output:
$ RUCIO_TAG=release-38.5.1 docker compose --file etc/docker/dev/init/docker-compose-init.yml up -d
[+] Running 2/2
✔ Container dev-ruciodb-1 Healthy 5.7s
✔ Container dev-rucio-init-1 Started 5.8s
$ docker exec -it dev-ruciodb-1 psql -U rucio -c "SELECT * from alembic_version"
version_num
-------------
(0 rows)
Metadata
Metadata
Assignees
Labels
No labels