I recently had to upgrade Ubuntu Xenial (16.04.5 LTS) to Bionic (18.04.1 LTS), and found a few pitfalls worth mentioning.

The server was a VPS from OVH, built from VPS 2016 SSD 1 template.

The first issue was that the upgrade process stuck at Setting up libnih1:amd64 (1.0.3-6ubuntu2) ...

A quick investigation showed that the issue was telinit u run by libnih’s post-installation script:

For the upgrade to continue, telinit had to be killed.

The second issue was that rsyslog and openssh-server failed to upgrade properly.

The log contains no useful information (except that rsyslogd failed to start), therefore we need to check manually what is wrong. RSYSLOG_DEBUG=Debug rsyslogd -d to the rescue.

In my case the issue is that the PID file exists, and it looks like it belongs to another rsyslogd process (though the PID is 372, and I have no idea why rsyslogd says it is 32050).

systemctl stop rsyslog obviously did not work, therefore I had to kill rsyslogd with kill $(</run/rsyslogd.pid). After that systemctl start rsyslog worked:

Now let us look what is wrong with OpenSSH:

systemd was not very helpful as to what went wrong, therefore I had to run sshd manually to see what happens. The actual error was “Missing privilege separation directory: /run/sshd”:

I don’t know who is to blame: systemd (the error was not logged in the journal) or OpenSSH (it did no send the error to the system log), but in case of any issues with OpenSSH, sshd -t helps 🙂

Honestly, I failed to solve this issue: in theory, systemd itself should create /run/sshd because of RuntimeDirectory=sshd in ssh.service, but something went wrong. If I run mkdir -m 0755 /run/sshd, systemctl start ssh still fails because /run/sshd gets removed but not created. Luckily, I had a KVM, so I just rebooted the server. It came online with OpenSSH up and running.

The most funny issue was that Ubuntu offered to report those errors to developers; however, according to the installer, the problem cannot be reported because “This problem report is damaged and cannot be processed”. I cannot say I am impressed by the QA team 🙂

Over the years, Ubuntu LTS’s quality gets worse and worse. Unfortunately.

Pitfalls When Upgrading Ubuntu Xenial to Bionic
Tagged on:         

Leave a Reply

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