Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unintended Database Schema Migration from OrientDB to H2/PostgreSQL in Latest Nexus Docker Image #544

Open
anqorithm opened this issue Dec 21, 2024 · 0 comments
Assignees
Labels

Comments

@anqorithm
Copy link

What problem are you trying to solve?
The issue occurred when using the :latest Docker image tag for the Nexus server. This led to an unintended database schema migration from OrientDB to H2/PostgreSQL, which was incompatible with the existing data stored in the volume.

Do you have a workaround you are using at present?
Yes, I rolled back to the sonatype/nexus3:3.70.1 image, which resolved the issue.

What feature or behavior is this required for?
The requirement is to prevent automatic database schema migration when updating the Nexus server image to a newer version.

How could we solve this issue? (Not knowing is okay!)
A potential solution could be to provide a more explicit warning or flag regarding database schema changes in newer image versions, or implement a version control mechanism for the database schema migration process. Additionally, enabling users to opt-out of automatic migrations during image updates would provide more control over the process.

How to fix the issue:
To fix the issue, the following steps can be taken:

  1. Rollback
    to a Known Working Version
    : Roll back to a previous stable version of the Nexus image (e.g., sonatype/nexus3:3.70.1) to avoid the unintended database migration.
  2. Pin Specific Image Versions: Avoid using the :latest tag in Docker and Docker Compose files. Pin the image to a specific version that is known to be stable and compatible with the existing database.
  3. Backup Data Before Updating: Always back up the Nexus data before upgrading to a new image version. This will allow easy recovery if there are compatibility issues after the update.

Tell us about your Nexus Repository deployment: what version, operating system, and database are you using?

  • Nexus Repository Version: Latest version, updated from sonatype/nexus3:3.70.1
  • Operating System: Ubuntu 22.04
  • Database: Originally OrientDB, migrated to H2/PostgreSQL

Anything else?
This issue caused compatibility problems with our existing data. A mechanism for controlling or verifying database migrations in updates would be beneficial to avoid such issues in the future.

Reference:
For more information on database options and migration strategies, please refer to Sonatype’s Database Options documentation.


Nexus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants