-
Notifications
You must be signed in to change notification settings - Fork 4
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
AMIs: v5.0.6 -> v5.1.x Migrator fails on upgrade if not booted, introducing schema drift #56
Comments
A manual run of the drift check ignoring the version tag check shows no drift -- this will be verified but indicates that the drift isn't real and the UI is indicating the wrong drift to to an inaccurate entry in the versions table
Inferring that migrations were run correctly but the |
During testing of this issue it appears the failing migrator init jobs completed correcting the instance version
drift seems to have resolved the versions table is correctly set So the root cause here seems to be an issue in the migrators init and run of the Admins experiencing this issue are advised to check for "orphaned"/errored |
Migrator fails on upgrade
Issue reported in v4.4
During an AMI upgrade, if an AMI instance is upgraded via the standard upgrade procedure, some drift may be introduce if the instance is not rebooted as instructed in step 10.
Reproduction
An instance s initialized in v4.4
Upgrade to v4.5.1 - reboot
Observe failing migrator pods after startup and attachment of old volume
reboot the EC2 machine and check for drift
Upgrade to v5.0.6
Upgrade to v5.0.6
Upgrade to v5.1.4
Version
Drift in UI
Manual drift check
Database version
Reboot in version 5.1.4
Checking drift against the v5.0.6 version
Actual logs omitted, but this drift output is the same as is registered in the Update page
Summary
On upgrade from v5.0.6 to v5.1.x the migrator isn't correctly initializing and setting the db state to the correct version. It is however likely running schema migrations. Either the migrations are being applied correctly and the schema drift in the updates page is the result of a bad
versions
table entry. Or the schema migrations aren't being run by theup
command.Given these conditions once the direction issue of the
up
operations failure is identified this can likely be solved manually by correct use of theupgrade
command. A hypothesis as to the root cause of this issue is the tagging of a5.0.6
image set insourcegraph/deploy
repo. Migrators image definitions insourcegraph/sourcegraph
repo may not handle correctly for the extra/missing version.The text was updated successfully, but these errors were encountered: