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

Older Kuma CP Fails on Restart After Newer Database Migration #12032

Open
vermdeep opened this issue Nov 13, 2024 · 1 comment
Open

Older Kuma CP Fails on Restart After Newer Database Migration #12032

vermdeep opened this issue Nov 13, 2024 · 1 comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@vermdeep
Copy link

vermdeep commented Nov 13, 2024

What happened?

After running a newer database migration, Kuma CP instances running on an older version fail to start if restarted. The following error is encountered:

ERROR   kuma-cp.run    unable to set up Control Plane runtime	{"error": "database is not migrated. Run \"kuma-cp migrate up\" to update database to the newest schema"}

Expected Behavior

Database migrations are expected to be backward compatible. An older version of Kuma CP should not crash on restart due to a newer migration.

We should check here if database is older version instead:
https://github.com/kumahq/kuma/blob/master/pkg/plugins/resources/postgres/migrate.go#L91

return dbVer < fileVer, nil
@vermdeep vermdeep added kind/bug A bug triage/pending This issue will be looked at on the next triage meeting labels Nov 13, 2024
@lobkovilya lobkovilya added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Nov 18, 2024
@lobkovilya
Copy link
Contributor

Triage: database schema should be backwards compatible for 2 versions back https://kuma.io/docs/2.9.x/production/upgrades-tuning/upgrades/#upgrade-kuma. We should take this into account when implementing the check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

No branches or pull requests

2 participants