Skip to content

init: Point alembic to migrate_repo folder in installed Rucio package#461

Open
ftorradeflot wants to merge 1 commit into
rucio:masterfrom
ftorradeflot:patch-460-init_alembic_version
Open

init: Point alembic to migrate_repo folder in installed Rucio package#461
ftorradeflot wants to merge 1 commit into
rucio:masterfrom
ftorradeflot:patch-460-init_alembic_version

Conversation

@ftorradeflot
Copy link
Copy Markdown

fix #460

@ftorradeflot ftorradeflot changed the title init: Point alembic to migrate_repo folder in installed Rucio packag init: Point alembic to migrate_repo folder in installed Rucio package Dec 9, 2025
@ftorradeflot ftorradeflot requested a review from rdimaio December 9, 2025 09:02
@rdimaio rdimaio removed their request for review December 14, 2025 19:14
@labkode
Copy link
Copy Markdown
Member

labkode commented Apr 28, 2026

Hi @ftorradeflot, we got hit by this bug in a few of our clusters (after more than 12 months running without issues ..._), so it came as a surprise when we couldn't run the migrations because of the missing info in the DB.

Is there a reason to remove the alembic -c /opt/rucio/etc/alembic.ini upgrade head from the instructions?

@ftorradeflot
Copy link
Copy Markdown
Author

Hi @ftorradeflot, we got hit by this bug in a few of our clusters (after more than 12 months running without issues ..._), so it came as a surprise when we couldn't run the migrations because of the missing info in the DB.

Is there a reason to remove the alembic -c /opt/rucio/etc/alembic.ini upgrade head from the instructions?

I did this I while ago and I don't fully remember.

I think the goal was to fix the initialization of the DB to include the alembic version hash. If you are using the init container to trigger automated DB upgrades then you should patch the executable. We are doing it, but according to the docs, it is not recommended to automate DB upgrades.

I doesn't seem to make sense to run both the upgrade and the bootstrap. I don't know ... it may be harmless and we could include both so that the init container can be used for initialization and upgrade without the need for changes. This should be tested.

We could also create a new (nearly identical) upgrade docker image or include a switch in the docker entrypoint to differentiate between init and upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rucio-init container does not add anything to alembic_version table

2 participants