-
Notifications
You must be signed in to change notification settings - Fork 29
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
lemp stack: support upgrading from older versions of mysql when the grain shut down uncleanly. #276
Comments
That's ugly and horrifying. :/ Is there any halfway decent way to tell it to abandon whatever changes it was trying to make prior to the crash or something like that instead? I loathe the idea of having to permanently include previous releases of MySQL. (Particularly since we don't have a working implementation of minUpgradeableVersion.) |
This is what the recovery process does, so no apparently -- not without the version that was trying to make the changes. But yes, we should get minUpgradableVersion working and then we could keep it to just one old version. |
MySQL can't recover its storage *and* upgrade in the same step, so we need to include MySQL 5.5 for grains which were shut down uncleanly before upgrade. A user who hit this reported it on sandstorm-dev. See also: sandstorm-io/vagrant-spk#276
It might be plausible to lift this from the TTRSS port as well... Our previous stacks would've been that version of MySQL as well, and it won't do anything to a grain where it's not applicable. And then if we upgrade the stacks' MySQL versions in the future we should be able to similarly mirror this behavior for additional versions of MySQL? |
Yeah, that should work. (Side note, it might be nice to have a nix stack). |
After the TTRSS upgrade, yesterday James Cook reported that his ttrss grain wasn't booting:
https://groups.google.com/forum/#!topic/sandstorm-dev/JggZ_kwFPEw
Inspecting the grain backup he sent me, I found this in the mysql error log:
So, my understanding of what happend here is that the grain had last shut down uncleanly before the upgrade. Unclean shutdowns are normally fine, as mysql (and any other database worth its salt) can recover automatically. But it seems that mysql cannot recover from an unclean shutdown if the crash happened when running an older version. So if mysql is shut down uncleanly and then the grain is updated to a newer version, recovery will fail on grain boot.
One way we could solve this is to embed older versions of the database for the purposes of recovering from crashes during upgrade.
It looks like the previous version used in ttrss was mysql 5.5?
The text was updated successfully, but these errors were encountered: