Debian 8 to Debian 9 “stretch”

Debian 9 “stretch” turned out to be a stretch indeed. A stretch of my patience and imagination it is. I finally got around to upgrading my desktop and servers to the latest stable and I am not amused. Oh, being on Debian for nearly 20 years I did plenty of upgrades and none of them were painless. Most of the time I actually ended up scrapping the system and installing fresh copies of servers to make sure things work. Recently it was getting better though and I did not see too many angry shouts about the upgrade so I decided to give it a go. I marked up this weekend for the upgrade because experience taught me I was going to need time to fix things before the work starts on Monday.

Well, all right, so on the desktop many applications were simply uninstalled. Fine, when I need something and I notice it missing I install the tool again. That’s annoying but no big deal really. The upgrade itself failed, predictably, but with a little push from our friend ‘apt-get install -f’ the upgrade worked its way through and actually completed, which was a pleasant surprise overall. On the servers though things are not looking good at all.

The update went fairly quickly and without errors so I was amazed with the smooth action. I did feel a little suspicious but after reading through the apt-listchanges did not see anything Earth shattering and felt reassured. Little did I know of what the next hours would bring… The mail server went quietly away and would not start giving me weird errors. I was certain I read about postfix updates in the apt-listchanges but this did not look like anything described there.

After a while I realized that I am looking at some strange errors and configuration of MariaDB instead of the MySQL. Oh, my! That was not mentioned anywhere during the upgrade, was it? No, really! Debian has quietly yanked the MySQL out of my server and installed MariaDB instead. Moreover, it pretended to port my DB to MariaDB, meaning they were now not compatible with MySQL!

Fantastic. So I headed to the MySQL sites where folks of Oracle actually give a fair warning that, yes, Debian will silently replace the database on upgrade. And Debian did not mention it except to note triumphantly that they provide now a much better and transparently compatible database in a press release.

Well, I tell you what. The MariaDB is not transparently compatible. It breaks things that rely on MySQL. This must be mentioned in the upgrade notes! In fact, this is the kind of change I should see before the upgrade in large letter across the screen:

WE WILL CHANGE THE DB! IT WILL BREAK THE SYSTEM!

That was a major problem and took me some time to fix – removing MariaDB, cleaning data directories, installing community edition MySQL, recovering the database and finally, the mail server agreed to start up and operate. Users would not have been amused, I tell you.

Now a few other smaller things and annoyances that I came across and how to fix them.

Postfix log lines look different, so you’ll have to rewrite your rules for logcheck to ignore the normal operational messages. That’s okay, we are used to this, just shrug and get moving.

Vim has become a nightmare suddenly, I could not just Unix style select and paste with the mouse, it kept switching to this idiotic visual mode. It turns out that vim now loads defaults from defaults.vim and those defaults override the defaults you set in your vim.local. How cool is that?

Add lines

"switch off the visual mode
set mouse-=a
" and stop overriding my config
let g:skip_defaults_vim = 1

to /etc/vim/vimrc.local to make vim behave more normal.

faill2ban has received a seemingly innocent rewrite of the options but your jail.local file will not work. Best to install the fail2ban from scratch and add your customizations to a fail in jail.d/ directory as advised. Mind you that if you enable any of the jails for the email – the default configuration will try to use a service “imap3” that does not exist, of course, breaking things for you again, kudos to the maintainer. Use the port line for each such block:

port = smtp,465,submission,imap,imaps,pop3,pop3s

Interestingly the mail filter clamav did not upgrade well and kept recommending me to head over to their website and read all about upgrading like if it was still running an old and outdated version or something. Purging it completely and reinstalling was the solution to clamav mail filtering.

If you decide to upgrade and you have MySQL on your server, make sure you do something sensible about it before the upgrade. Either set up a community edition or dump the data and uninstall. I think it is better to install your DB and populate from scratch than to try to migrate it, frankly.

Leave a Reply

Your email address will not be published. Required fields are marked *