AlmaLinux / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp)
https://almalinux.org/elevate/
Apache License 2.0
28 stars 26 forks source link

oraclelinux-release-el8 package not present after CentOS 7 to Oracle Linux 8 #94

Open uoe-pjackson opened 9 months ago

uoe-pjackson commented 9 months ago

Actual behavior Following what appears to be a another-wise successful upgrade from Centos 7 to Oracle Linux 8 package updates/installs fail. Note this is very similar to what happened in issue #54.

[root@localhost yum.repos.d]# dnf install nmap
Last metadata expiration check: 23:30:05 ago on Mon 27 Feb 2023 14:46:34 GMT.
No match for argument: nmap
Error: Unable to find a match: nmap

It appears to be due to /etc/yum.repo.d/oracle-linux-ol8.repo is not preset:

[root@leapp-test yum.repos.d]# ls -l
total 16
-rw-r--r--. 1 root root  379 Mar 17  2023 ELevate.repo

this appears to be due to the absence of oraclelinux-release-el8

# rpm -q oraclelinux-release-el8
package oraclelinux-release-el8 is not installed

Installing the package manually fixes the issue

[root@leapp-test peter]# dnf install https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/getPackage/oraclelinux-release-el8-1.0-28.el8.x86_64.rpm
Last metadata expiration check: 1:35:21 ago on Thu 01 Feb 2024 21:33:27 GMT.
oraclelinux-release-el8-1.0-28.el8.x86_64.rpm                                                                                        142 kB/s |  22 kB     00:00
Dependencies resolved.
=====================================================================================================================================================================
 Package                                          Architecture                    Version                                Repository                             Size
=====================================================================================================================================================================
Installing:
 oraclelinux-release-el8                          x86_64                          1.0-28.el8                             @commandline                           22 k

Transaction Summary
=====================================================================================================================================================================
Install  1 Package

Total size: 22 k
Installed size: 22 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                             1/1
  Installing       : oraclelinux-release-el8-1.0-28.el8.x86_64                                                                                                   1/1
  Running scriptlet: oraclelinux-release-el8-1.0-28.el8.x86_64                                                                                                   1/1
  Verifying        : oraclelinux-release-el8-1.0-28.el8.x86_64                                                                                                   1/1

Installed:
  oraclelinux-release-el8-1.0-28.el8.x86_64

Complete!
[root@leapp-test yum.repos.d]# ls -l
total 16
-rw-r--r--. 1 root root  379 Mar 17  2023 ELevate.repo
-rw-r--r--. 1 root root 3660 Nov  8  2022 oracle-linux-ol8.repo
-rw-r--r--. 1 root root  941 Nov 10  2022 uek-ol8.repo
-rw-r--r--. 1 root root  243 Nov 10  2022 virt-ol8.repo
[root@leapp-test yum.repos.d]# dnf -y install nmap
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                                6.0 MB/s |  68 MB     00:11
Oracle Linux 8 Application Stream (x86_64)                                                                                           4.8 MB/s |  54 MB     00:11
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)                                                           3.2 MB/s |  85 MB     00:27
Last metadata expiration check: 0:00:06 ago on Thu 01 Feb 2024 23:12:26 GMT.
Dependencies resolved.
=====================================================================================================================================================================
 Package                               Architecture                       Version                                    Repository                                 Size
=====================================================================================================================================================================
Installing:
 nmap                                  x86_64                             2:7.92-1.el8                               ol8_appstream                             5.9 M
Installing dependencies:
 nmap-ncat                             x86_64                             2:7.92-1.el8                               ol8_appstream                             242 k

Transaction Summary
=====================================================================================================================================================================
Install  2 Packages

Total download size: 6.2 M
Installed size: 24 M
Downloading Packages:
(1/2): nmap-ncat-7.92-1.el8.x86_64.rpm                                                                                               1.0 MB/s | 242 kB     00:00
(2/2): nmap-7.92-1.el8.x86_64.rpm                                                                                                    6.5 MB/s | 5.9 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                6.7 MB/s | 6.2 MB     00:00
Oracle Linux 8 Application Stream (x86_64)                                                                                           161 kB/s | 3.1 kB     00:00
Importing GPG key 0xAD986DA3:
 Userid     : "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
 Fingerprint: 76FD 3DB1 3AB6 7410 B89D B10E 8256 2EA9 AD98 6DA3
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                             1/1
  Installing       : nmap-ncat-2:7.92-1.el8.x86_64                                                                                                               1/2
  Running scriptlet: nmap-ncat-2:7.92-1.el8.x86_64                                                                                                               1/2
  Installing       : nmap-2:7.92-1.el8.x86_64                                                                                                                    2/2
  Running scriptlet: nmap-2:7.92-1.el8.x86_64                                                                                                                    2/2
  Verifying        : nmap-2:7.92-1.el8.x86_64                                                                                                                    1/2
  Verifying        : nmap-ncat-2:7.92-1.el8.x86_64                                                                                                               2/2

Installed:
  nmap-2:7.92-1.el8.x86_64                                                       nmap-ncat-2:7.92-1.el8.x86_64

Complete!

To Reproduce Steps to reproduce the behavior

  1. Perform a Fresh install of CentOS 7 picking the Minimal install type
  2. Perform upgrade with:
    yum install -y http://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm
    yum install -y leapp-upgrade leapp-data-oraclelinux
    leapp answer --add --section remove_pam_pkcs11_module_check.confirm=True
    leapp preupgrade
    leapp upgrade --reboot
  3. Confirm upgrade is sucessful:
    $ cat /etc/system-release
    Oracle Linux Server release 8.9
    $ uname -a
    Linux leapp-test 4.18.0-513.11.0.1.el8_9.x86_64 #1 SMP Thu Jan 11 11:30:45 PST 2024 x86_64 x86_64 x86_64 GNU/Linux
  4. Attempt to install a package
    # dnf install nmap
    Last metadata expiration check: 1:21:36 ago on Thu 01 Feb 2024 21:33:27 GMT.
    No match for argument: nmap
    Error: Unable to find a match: nmap

    Expected behavior I'd expect the nmap package to be installed

System information (please complete the following information):

Pre-upgrade

$ rpm -qa "*leapp*"
leapp-0.14.0-1.el7.noarch
python2-leapp-0.14.0-1.el7.noarch
leapp-deps-0.14.0-1.el7.noarch
leapp-data-oraclelinux-0.2-4.el7.noarch
leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.19.noarch
leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.19.noarch

leapp-logs.tar.gz file attached


Additional context

/var/log/leapp/leapp-report.txt contains the following

Risk Factor: high
Title: Packages from unknown repositories may not be installed
Summary: 1 packages may not be installed or upgraded due to repositories unknown to leapp:
- oraclelinux-release-el8 (repoid: ol8-BaseOS)
Remediation: [hint] Please file a bug in http://bugzilla.redhat.com/ for leapp-repository component of the Red Hat Enterprise Linux product.
Key: 9a2b05abf8f45fd7915e52542887bb334bb218ea

journalctl.txt leapp-logs.tar.gz

uoe-pjackson commented 9 months ago

I should add that an upgrade worked successfully on 2024-01-26 so something has likely changed since then. Maybe at Oracle's end?

MitchellBot commented 9 months ago

I came here to report the same, and am glad I'm not the only one experiencing the issue. For a workaround, we discovered that using this specific version of leap-data-oraclelinux works: leapp-data-oraclelinux-0.2-3.el7.2

Oddly, this package is from January 17th 2024 whereas the 0.2-4.el7 package that is marked as the "latest" is from November 2023.

uoe-pjackson commented 9 months ago

I've found what I believe is the issue.

--- leapp-data-oraclelinux-0.2-3.el7.2.noarch/etc/leapp/files/pes-events.json   2024-01-17 08:56:48.000000000 +0000
+++ leapp-data-oraclelinux-0.2-4.el7.noarch/etc/leapp/files/pes-events.json     2023-11-22 10:42:43.000000000 +0000
@@ -81024,7 +81024,7 @@
           {
             "module_stream": null,
             "name": "oraclelinux-release-el8",
-            "repository": "ol8-baseos"
+            "repository": "ol8-BaseOS"
           }
         ],
         "set_id": 3891

This should be "repository": "ol8-baseos"

I've confirmed by manually making this change that pes-events.json that the upgrade runs ok.

andrewlukoshko commented 9 months ago

Thanks for the report! We'll fix this soon.