Description of problem: convert2rhel just fails when the GPG key is missing instead of allowing to import/continue after importing it: Continue with the system conversion? [y/n]: y [05/03/2020 20:34:41] TASK - [Convert: Prepare kernel] ****************************************** Installing RHEL kernel ... [05/03/2020 20:34:41] DEBUG - Calling command 'yum install -y --disablerepo=* --enablerepo=mnt_rhel kernel' Geladene Plugins: etckeeper, fastestmirror Loading mirror speeds from cached hostfile Abhängigkeiten werden aufgelöst --> Transaktionsprüfung wird ausgeführt ---> Paket kernel.x86_64 0:3.10.0-1127.el7 markiert, um installiert zu werden --> Abhängigkeit system-release wird für Paket kernel-3.10.0-1127.el7.x86_64 verarbeitet --> Transaktionsprüfung wird ausgeführt ---> Paket redhat-release-server.x86_64 0:7.8-2.el7 markiert, um installiert zu werden --> Abhängigkeitsauflösung beendet --> Transaktionsprüfung wird ausgeführt ---> Paket kernel.x86_64 0:3.10.0-957.27.2.el7 markiert, um gelöscht zu werden --> Abhängigkeitsauflösung beendet Abhängigkeiten aufgelöst ================================================================================ Package Arch Version Paketquelle Größe ================================================================================ Installieren: kernel x86_64 3.10.0-1127.el7 mnt_rhel 50 M Entfernen: kernel x86_64 3.10.0-957.27.2.el7 @updates/7 63 M Als Abhängigkeiten installiert: redhat-release-server x86_64 7.8-2.el7 mnt_rhel 29 k Transaktionsübersicht ================================================================================ Installieren 1 Paket (+1 Abhängiges Paket) Entfernen 1 Paket Gesamte Downloadgröße: 50 M Downloading packages: Warnung: /mnt/rhel/Packages/kernel-3.10.0-1127.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, Schlüssel-ID fd431d51: NOKEY Öffentlicher Schlüssel für kernel-3.10.0-1127.el7.x86_64.rpm ist nicht installiert -------------------------------------------------------------------------------- Gesamt 66 MB/s | 50 MB 00:00 Öffentlicher Schlüssel für kernel-3.10.0-1127.el7.x86_64.rpm ist nicht installiert [05/03/2020 20:34:56] CRITICAL - Error occured while attempting to install the RHEL kernel [05/03/2020 20:34:56] DEBUG - Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 86, in main post_ponr_conversion() File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 189, in post_ponr_conversion pkghandler.preserve_only_rhel_kernel() File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 353, in preserve_only_rhel_kernel needs_update = install_rhel_kernel() File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 373, in install_rhel_kernel loggerinst.critical("Error occured while attempting to install the" File "/usr/lib/python2.7/site-packages/convert2rhel/logger.py", line 100, in critical sys.exit(1) SystemExit: 1 Version-Release number of selected component (if applicable): convert2rhel-0.9-1.el7.noarch
Additional info: After this error, they system was broken so that convert2rhel cannot be called anymore because it seems to have removed /etc/system-release at this point.
Hi Till, thanks for the report and sorry for the troubles. We know about the issue and we're working on it. There are these three possible workarounds for now: - import the RHEL GPG key before running the conversion `rpm --import /<mnt_rhel repo baseurl path>/RPM-GPG-KEY-redhat-release` - add "gpgcheck=0" to the mnt_rhel repo definition - add "gpgkey=file:///<mnt_rhel repo baseurl path>/RPM-GPG-KEY-redhat-release" to the mnt_rhel repo definition
(In reply to Michal Bocek from comment #2) > Hi Till, thanks for the report and sorry for the troubles. We know about the > issue and we're working on it. > > There are these three possible workarounds for now: > - import the RHEL GPG key before running the conversion > `rpm --import /<mnt_rhel repo baseurl path>/RPM-GPG-KEY-redhat-release` > - add "gpgcheck=0" to the mnt_rhel repo definition > - add "gpgkey=file:///<mnt_rhel repo baseurl > path>/RPM-GPG-KEY-redhat-release" to the mnt_rhel repo definition Thanks, it would be great if you would add this info to the documentation at: https://access.redhat.com/articles/2360841
Indeed. We're on it.
We've added the following to the documentation: "Important: The convert2rhel utility currently does not import GPG keys automatically. To prevent a conversion failure, either import the RHEL GPG key (release key 2) before running convert2rhel, or ensure that yum skips the GPG key check by adding the gpgcheck=0 directive to the custom repository definitions."
There's an upstream PR that should resolve the issue: https://github.com/oamg/convert2rhel/pull/31
FEDORA-EPEL-2020-d0a4bcf7f1 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-d0a4bcf7f1
FEDORA-EPEL-2020-baa69bfeef has been pushed to the Fedora EPEL 7 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-baa69bfeef See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-d0a4bcf7f1 has been pushed to the Fedora EPEL 6 testing repository. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-d0a4bcf7f1 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-EPEL-2020-baa69bfeef has been pushed to the Fedora EPEL 7 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-EPEL-2020-d0a4bcf7f1 has been pushed to the Fedora EPEL 6 stable repository. If problem still persists, please make note of it in this bug report.