How to upgrade a ubuntu 18.04 host to 20.04 using the subscription manager with foreman?

I currently have a working 18.04 host with the repo’s you find normally through foreman.
I also have the 20.04 and also verified that it’s configured and working aswell.

I tried searching online but couldn’t find any documentation how to do this for ubuntu.

I did try it myself, but i ended up adding the 20.04 repo and upgrading the packages followed by doing:
sudo apt-get dist-upgrade. In the end doing an apt update gave some problems that apt-transport-katello was missing, adding back the atix repo gave that some sort of python package was missing.

now i do believe the above is simply b/c i went from a python 2 subscription manager to one that should run the python 3 variant. However while my testing seemed to went well, it doesn’t sit me right to do this in production aswell. I would prefer using do-release-upgrade if that’s possible.

Anyone can advice me on this one? Do assume that reaching the public ubuntu repo’s is not possible and that the /etc/apt/sources.list is empty/removed.

Generally, for production machines, the best approach is to rebuild on the new release. That also avoid getting extra cruft that comes with each a new release. For example, if you don’t have snap, upgrading to 20.04 would reinstall it.

I would expect that if the host is subscribed and has access to both 18.04 and 20.04 repos + both ATIX repos, then the standard upgrade workflow should work. However, it doesn’t seem to be simple. do-release-upgrade doesn’t think I have focal when both 18.04 and 20.04 are presented from only subscription-manager want to add sources or cancel.


I did answer Y to all, but immediately after cleared sources.list. The upgrade went on without issues. However, I had to go to a number of prompts for conf files, snapd, etc. The upgrade did reset various configuration on the image I used on KVM… I don’t see myself doing this on a production server. Just too messy, maybe only as a last resort.

My best guess is that the “no valid entry for ‘bionic’ was found.” is caused, because Katello does not always use the exact same repo structure and suite values for the APT repos it serves as the upstream originals. The Ubuntu release-upgrade probably interprets this as “Help the repos for bionic are missing”.

We do have it on our roadmap to make pulp_deb/Katello use the exact upstream structure for any APT repositories it serves, but this requires creating new interfaces between Katello and subscription-manager, which cannot be done very quickly/easily. I would describe it as a medium term goal. Until this milestone is reached, this aspect will likely just remain messy.

The fact that Ubuntu wants to change configuration as part of the release-upgrade is probably down to changes in Ubuntu, so there is likely nothing Katello can do about that.

i see, from my hobby i’m always used to just upgrade as a fresh installed wasn’t needed.
In production and thanks to you, i’ve learned it’s better to start off clean, thank you! I’ll resolve this issue as i rather take the good advice then go risky.