An Appeal to Devs – Please Use News
Well, I spent half of today rebuilding my system, and upgrading mysql.
I figured that I might use the opportunity of my newly-found spare time while running revdep-rebuild to perhaps put out a general plea for developers to make use of the news feature in portage.
Upgrading to mysql 5.1 requires doing a full dump of your databases, some manual cleanup, an upgrade, and then some manual restore steps. Oh, and that dump has to be done BEFORE the upgrade or you end up having to revert back to 5.0 (which I ended up doing). Usually mysql upgrades are relatively painless, but jumps between major versions (0.1 level) are often not.
The upgrade also breaks anything that links to libmysql, which is quite a bit on a system that runs any number of services (mail, mythtv, ulog, etc).
It might have been nice if a news item were published a day or two before stabilizing mysql 5.1 so that users might have some advance warning and could plan accordingly.
Now, this upgrade didn’t rise to the level of some of the past breakages that actually were very painful to recover from and could result in unbootable systems/etc. Still, it never hurts to give users notice. The beauty of news items is that they only pester users who will actually be impacted by them. I don’t think anybody running mysql would mind a reminder that an upcoming upgrade requires careful planning – this is far more relevant to users than half the stuff we put in elogs/etc.
On the other hand, I do appreciate the mysql upgrade guide on the gentoo website (might not hurt to update it a tiny bit), and Peter Davies’s blog entry from 1.5 years ago was very helpful. If these had been pointed out before stabilizing the build the stable experience would have been a little smoother.
blackflag ~ # eselect news list
News items:
[1] read 2010-02-21 MySQL 5.1 unmasking and upgrade procedures
[2] read 2010-03-25 Python 3.1
[3] read 2010-08-01 –as-needed enabled in default profiles
[4] read 2009-04-18 Generation 1 Java Setup Deprecated
blackflag ~ #
Umm, one was issues in February… hitting stable might have been late, but it stated basically everything you asked for. RTFM.
George
September 4, 2010 at 9:36 pm
If the news item didn’t come out more than six months before the upgrade was actually released, it might have been more noticeable. Maybe we just need to bump news items when things go stable. I doubt anybody would remember a news item from six months back.
rich0
September 5, 2010 at 5:32 am
Umm, wtf? MySQL does NOT require the dump/cleanup/upgrade/restore except in extremely rare cases. You’re confusing it with PostgreSQL.
In 99% of cases, you can just upgrade and continue using the databases directly. For 99% of the remaining one percent (so we’re at 99.99% percent now), using the mysql_upgrade binary will set you right very quickly.
That 0.001%? That’s called using the really old ISAM tables (not MyISAM, but pure ISAM) from MySQL 3.23 and not converting them until you suddenly upgraded to 5.1.
For libmysqlclient (there is no libmysql at all), Portage’s preserved libraries feature works perfectly, and the old .15 version connects to the new server perfectly fine.
robbat2
September 5, 2010 at 4:34 am
See:
http://bugs.mysql.com/bug.php?id=44640
http://bugs.mysql.com/bug.php?id=47205
mysql_upgrade apparently does not always work on InnoDB tables. For whatever reason the binary format changes and newer versions don’t always support the older ones.
I agree that 99% of the time mysql upgrades are smooth, which is why this one caught me off-guard.
rich0
September 5, 2010 at 5:36 am
My databases all upgraded in place, but I did have to rebuild some stuff (mod_auth_mysql, PHP, to name a couple) before they would come back up (I mistakenly fogot to revdep-rebuild before trying to restart apache and it whined at me, luckily it whined about a config file being wrong (due to a library missing) and didn’t actually shutdown apache yet.
Edgeman
September 5, 2010 at 9:01 am
Yup – for those using the more typical MyISAM configuration the upgrade was relatively painless. The more painful rebuilds I faced included PHP (mainly since it takes a long time), and qt-sql (since it impacts mythtv, but not obviously-so). revdep-rebuild clearly got it all, but I was trying to prioritize the mythtv fixes so that the family wasn’t overly deprived… 🙂
I didn’t mean this to come across overly harsh – I really do just mean this as constructive criticism. The MySQL team shouldn’t be singled out either. When it comes to disruptive upgrades, you really can’t have too much warning.
rich0
September 5, 2010 at 9:07 am
I should clarify, by “upgraded in place” I mean I didn’t do anything other than emerge -uva mysql
I do recall having to jump through hoops on the 4.x to 5.x upgrade, but nothing since then that I can recall…
Edgeman
September 5, 2010 at 9:08 am
Hear, hear! When an upgrade breaks things, and I find out that the issue was known about in advance, it’s very frustrating. The libpng-1.4 upgrade was a disaster for me.
Amy de Buitléir
September 5, 2010 at 11:50 am