Ubuntu server 22.04 upgrade?

So most of my services are hosted on Ubuntu 20.04. I know that recently canonical has released ubuntu server 22.04. I’m just wondering if it’s a good idea to upgrade to 22.04. I tried on two of my proxmox VMs but when I run do-release-upgrade it shows there is no new release. In order to get the upgrade to work I have to use the -d flag to allow a development version. But I thought that 22.04 is an official release. I managed to upgrade 2 of my vm’s using the -d flag. It broke my install of nextcloud on one and the other worked just fine. This makes me wonder if 22.04 is ready for the migration.

Is this just an early development release? Should I wait to upgrade? What is everyone else doing? This is the first new release of LTS ubuntu since I’ve started using linux so I’m not sure if there is a development to full release process here.

Ubuntu never had the option to upgrade from LTS to LTS from the beginning without the -d option. It does get the option to migrate without the -d parameter after about a month or two.

When I used to use Ubuntu, if there was no rush to install the newer version (like newer hardware), I would wait for about a year for xy.04.1 to get released, just so that all the bugs get ironed out.

That’s pretty impressive actually. Did it break the DB or what? Because nextcloud should be pretty distro agnostic, it’s just some files on a web server and a DB.

Even if you upgrade with the -d option now, you get the final version of Ubuntu 22.04. It’s the upgrade script itself that’s still not thoroughly tested until the first point release.

I upgraded 2 servers from 20.04 to 22.04 in the past week. Overall it went well.

  • On my Supermicro server (Intel Atom CPU / AMD64) it went smooth - except that the script stalled at some point, saying that I should reboot after upgrading Dbus. But luckily I didn’t do anything, and the script continued after a while.
  • On my Raspberry Pi server (ARM 64) it went good, until the script tried to remove the running kernel (I guess it was some dependency issue). I aborted this, which resulted in the upgrade script was not fininshed cleaning up unneeded packages properly. So I ended up manually cleaning 50+ orphaned packages.

So overall I think it’s ready for upgrade in a non-production and non-critical environment. All my Docker containers with services are running smoothly after the upgrade, and the same with Samba, Postfix, Unbound and any other essential services on the system.

Always be prepared to do a full reinstall in any case.

1 Like

Those stories are why I really like rolling release distros that are not bleeding edge, like OpenSUSE Tumbleweed and Void.

I’m not sure. I didn’t really dig into it. I couldn’t access it through web interface anymore. I was running it through Nginx Proxy Manager so it might have been broken somewhere in that chain. I didn’t have any time to look into it so I just rolled back my VM image (thank god for backups). I’ll try it again when I have more time to dig into it.

1 Like

No need to look into it if you got it up and running, but generally, it is supposed to be an IT tradition to find out why stuff broke and get preventive measures to make it not happen again. But in all honesty, not a lot of places follow this, because in IT, most of the issues that are happening are one-time events.

With the GUI broken, I would think something at nginx or whatever web server you are using on the nextcloud VM may have changed and had some incompatible settings. Or maybe something was autoremoved during an update, who can say…

I took the time to create a new Linux container for testing an upgrade from Ubuntu 20.04 LTS to Ubuntu 22.04 LTS for my ClassicPress website. I have imported the database and ClassicPress files into my new Linux container and everything is working in Ubuntu 20.04. After I performed an upgrade to 22.04, Apache is not reading the index.php file and instead outputs as follows:

<?php
/**
 * Front to the ClassicPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells ClassicPress to load the theme.
 *
 * @package ClassicPress
 */

/**
 * Tells ClassicPress to load the ClassicPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);

/** Loads the ClassicPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );

Everything is working with Ubuntu 20.04 with PHP 7.4, but not Ubuntu 22.04 with PHP 8.1. I could jump to conclusion that ClassicPress does not support PHP 8.1 yet, but I am not sure why Apache outputted an index.php file as plain text instead of PHP for 22.04.

I use the lxc-create/lxc-start/lxc-attach commands for creating, starting, and running a container and everything went well.

For my production website, I’m still going to stick with Ubuntu 20.04 LTS.

And I almost forgot. Even though I enabled a2enconf php7.4-fpm for Ubuntu 20.04 LTS and everything went well, after upgrading to Ubuntu 22.04, I had to manually enable php8.1 module and php8.1-fpm configuration for it to work, but nothing has changed even if I enable them in 22.04. Apache still outputs a plain-text PHP file regardless of the changes I made after an upgrade to 22.04.

Update: Okay, I created a phpinfo.php file in the root folder of my web server in a testing environment and I added the line as follows:

<?php phpinfo(); ?>

Once I do that, I am able to read the contents of PHP file such as the operating system, PHP version, and any other information outputted by phpinfo() function. So it’s not the Ubuntu upgrade that’s the problem, it’s that ClassicPress does not support PHP 8.1, so I’m staying with PHP 7.4 in Ubuntu 20.04 for the time being.

Update 2: I might try staying with Ubuntu 20.04 and use a PPA to upgrade to 8.1 to see if I could rule out the problem, but I think this might happen the same thing as upgrading to 22.04 had caused.

1 Like

Maybe try setting up a burner container, where you go with 22.04 from the start, and then restore your website into?

The result is the same with fresh 22.04 container.

1 Like

It’s been quite some time since I’ve initially posted about this, but the upgrade repair on my nextcloud instance really was deadly simple. After upgrading to ubuntu server 22.04 I needed to enable php 8.1 on apache.

sudo a2enmod php8.1

After enabling php 8.1 I had to re-configure /etc/php/8.1/apache2/php.ini the same as the initial setup. It’s been running flawlessly since. It only took me about 5 minutes to repair nextcloud and have it working good as new.

1 Like