Project

General

Profile

Actions

Defect #43699

closed

Fatal error during database migration process

Added by Tim Totten 28 days ago. Updated 28 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Resolution:
Invalid
Affected version:

Description

So a few years back (2019) we switched from building Redmine from source to using the official Docker image.
Which has worked great since then and made upgrades so much easier.

Until today. The first time I've had to rollback an upgrade!

The image I was upgrading from (and have since rolled back to):

Environment:
  Redmine version                6.0.6.stable
  Ruby version                   3.3.8-p144 (2025-04-09) [x86_64-linux]
  Rails version                  7.2.2.1
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Subversion                     1.14.2
  Mercurial                      6.3.2
  Bazaar                         3.3.2
  Git                            2.39.5
  Filesystem                     
Redmine plugins:
  no plugin installed

The image I was upgrading to was using tag `redmine:latest`, and is identified as version `6.1.1` in the image metadata.

It complained first about not being able to rename `oauth_access_grants`.
A second try after tweaking the running MariaDB instance had an error about `oauth_applications` already existing.
So I dropped both those tables and tried a third time. The original error about renaming the (now non-existent) table re-appeared.

So I ended up restoring my database and rolling back to 6.0.6 which works fine. I'm sticking with it until I can find a working solution.

I am attaching the combined logs from the 6.1.1 container to see if they make any more sense to a Redmine developer.


Files

Actions #1

Updated by Holger Just 28 days ago

  • Status changed from New to Closed
  • Resolution set to Invalid

The errors in your logs are low-level errors of your database server (Maria DB). It looks like the database structure on disk is somehow corrupted and MariaDB can not perform some of its desired operations.

This is unrelated to Redmine but must be checked on your database server and its logs. Unfortunately, there is a possibility that your entire database is broken now and you may have to restore it from backups. This could have various causes, such as fill storage space (or quotas), concurrent access of multiple server processes to the same files, data corruption, ...

This is impossible to know from the (high-level) Redmine logs though. Again, check your database server. And make sure you have backups! If you don not have working backups from before the error occurred, you may want to perform a full backup of the database files now for the off-chance to rescue something from there if required.

In addition, please note that when rolling back Redmine versions, you also have to rollback any database migrations which have occurred as part of the version update. Sometimes, this is fully possible (e.g. if only an additional column was added), sometimes these migrations are non-reversible. As such, please make sure that you have working backups of your database before running any upgrade and only allow production traffic back once you have confirmed that the update was completed in order to possibly allow a clean database rollback in case of errors.

Finally, please note that the Docker "Official Images" are maintained by Docker, not the Redmine project. They are thus entirely maintained as a third-party distribution, similar to the Redmine packages in distributions such as Debian or FreeBSD. Any issues you have with the Docker images specifically may be better targeted at the support channels of this Docker image, e.g. at https://github.com/docker-library/redmine. This definitely applies to things like (automated) upgrades, backup procedures and the integration of the various Docker components into a full system.

As such, I'd now close this issue here since I do not see anything we could do from our end here. If you have spotted a bug in Redmine, please open a new issue. For general discussions about using or administering Redmine, please use the Redmine forums instead.

Actions

Also available in: Atom PDF