oamg / convert2rhel

A tool to automate converting Oracle/CentOS/Scientific/Rocky/Alma Linux to Red Hat Enterprise Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CentOS repos not properly restored after aborted conversion

andersensam opened this issue · comments

After an abort in the convert2rhel process, CentOS yum repos are not properly re-installed. It seems that $releasever is not properly being parsed.

When running yum repolist all on a broken system the following will appear:

base/$releasever/x86_64 CentOS-$releasever - Base
...
cr/$releasever/x86_64 CentOS-$releasever - cr

Where on a working system yum repolist all produces the following:

base/7/x86_64 CentOS-7 - Base
...
cr/7/x86_64 CentOS-7 - cr

This leaves the system in an unusable state.

I'm just a fellow user, not a dev but here's a potential troubleshooting step: is there a centos-release package installed on the broken system? If there isn't, if you install one manually from http://mirror.centos.org/centos/7/os/x86_64/Packages/ do things then work?

Thanks for the report, @andersensam, and sorry for keeping you waiting.
@abadger has a good question about the centos-release package.

Do you happen to have the /var/log/convert2rhel/convert2rhel.log file from the system where this happened? I would not be surprised to see "Couldn't download the centos-release package using yumdownloader."

The reasons causing the issue:

  • The system packages are not up-to-date and the CentOS Linux repos don't contain older versions of packages. For example, I'm on CentOS Linux 8.3 but 8.4 is already available and the CentOS Linux repos contain only 8.4 packages, so when Convert2RHEL tries to download packages of version present in 8.3, it fails.
  • Or, the system does not have the original vendor repos enabled.

Currently, when that happens, the conversion continues with a displayed warning in the terminal but nothing else. In case of a rollback, the rollback is incomplete and leaves the system in a broken state.

We plan to halt the conversion when this happens (#358).