zabbly / incus

Incus package repository
176 stars 14 forks source link

Upgrade from Ubuntu 20.04 to Ubuntu 22.04 breaks Incus' qemu/kvm (libnettle7 vs libnettle8). #35

Closed Eihrister closed 4 months ago

Eihrister commented 4 months ago

Hi,

I had an Ubuntu 20.04 host running LXD. A few days ago, I decided to migrate everything to Incus and everything worked great! Today, I decided to use Ubuntu's do-release-upgrade to upgrade to Ubuntu 22.04.

Containers worked fine out of the box, and I fixed some minor non-Incus-related issues. Then I noticed my Incus-managed qemu/kvm instances hadn't started. This is because the upgrade left the Incus of 20.04 installed, and with a priority of 100 instead of 500. So it took priority over other versions and a simple apt update; apt upgrade -y didn't work. Neither did an apt-get install --reinstall incus, because it said it couldnt be downloaded (as it was pointing to /var/lib and not an online repo, due to the upgrade).

I managed to fixed it by seeing what versions were available for Incus through apt-cache policy incus, and then running:

apt-get install incus=0.7-202403281728-ubuntu22.04 incus-base=0.7-202403281728-ubuntu22.04 incus-client=0.7-202403281728-ubuntu22.04

As the 22.04 version is obviously built against libnettle8 and no longer relying on the removed libnettle7. This solution might help other people that run into issues after upgrading from Ubuntu 20.04 to Ubuntu 22.04. It won't break upgrade-paths, and apt-cache policy incus is clean now, no more upgrade-related source:

home :: ~ » apt-cache policy incus
incus:
  Installed: 0.7-202403281728-ubuntu22.04
  Candidate: 0.7-202403281728-ubuntu22.04
  Version table:
 *** 0.7-202403281728-ubuntu22.04 500
        500 https://pkgs.zabbly.com/incus/stable jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.7-202403280454-ubuntu22.04 500
        500 https://pkgs.zabbly.com/incus/stable jammy/main amd64 Packages
home :: ~ »

Before it was showing the upgrade-related version of 20.04.

Kind regards,

Daniël Mostertman

Eihrister commented 4 months ago

As there's no issue at the moment anymore, feel free to close it. But perhaps it's somehow possible to avoid this in some way and just have a clear upgrade path. Maybe the 22.04 package had a slightly lower version number than the 20.04 somehow..