oamg / leapp-repository

Leapp repositories containing actors for the Leapp framework (https://github.com/oamg/leapp). Currently provides leapp repositories for in-place upgrades of RHEL systems.
Apache License 2.0
52 stars 146 forks source link

DNF execution failed with non zero exit code. #1300

Closed DeuxCatPotes closed 3 weeks ago

DeuxCatPotes commented 3 weeks ago

Not sur I have done the right thing.

I try to upgrade ol7 to ol8. I get an issue even if pre-upgrade step pass only with warning.

Command

leapp preupgrade --oraclelinux

Output :

============================================================
                      REPORT OVERVIEW                       
============================================================

HIGH and MEDIUM severity reports:
    1. Leapp detected loaded kernel drivers which are no longer maintained in OL 8.
    2. Detected customized configuration for dynamic linker.
    3. GRUB2 core will be automatically updated during the upgrade
    4. Difference in Python versions and support in OL 8
    5. Packages not signed by Oracle found on the system
    6. Default Boot Kernel
    7. Module pam_pkcs11 will be removed from PAM configuration

Reports summary:
    Errors:                      0
    Inhibitors:                  0
    HIGH severity reports:       5
    MEDIUM severity reports:     2
    LOW severity reports:        2
    INFO severity reports:       2

Before continuing consult the full report:
    A report has been generated at /var/log/leapp/leapp-report.json
    A report has been generated at /var/log/leapp/leapp-report.txt

============================================================
                   END OF REPORT OVERVIEW                   
============================================================

the command :

leapp upgrade --oraclelinux

and it output :

Following errors occurred and the upgrade cannot continue:
    1. Actor: dnf_package_download
       Message: DNF execution failed with non zero exit code.

and the related part in log (I guess)

    Stderr: No matches found for the following disable plugin patterns: subscription-manager
            Warning: Packages marked by Leapp for upgrade not found in repositories metadata: python2-leapp leapp-upgrade-el7toel8 leapp gpg-pubkey
            RPM: warning: Generating 6 missing index(es), please wait...
            Error: Transaction test error:
              file /usr/lib/python2.7/site-packages/ipaddress.py from install of python2-ipaddress-1.0.18-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch
              file /usr/lib/python2.7/site-packages/ipaddress.pyc from install of python2-ipaddress-1.0.18-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch
              file /usr/lib/python2.7/site-packages/ipaddress.pyo from install of python2-ipaddress-1.0.18-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-ipaddress-1.0.16-2.el7.noarch
              file /usr/lib/python2.7/site-packages/six.py from install of python2-six-1.11.0-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
              file /usr/lib/python2.7/site-packages/six.pyc from install of python2-six-1.11.0-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
              file /usr/lib/python2.7/site-packages/six.pyo from install of python2-six-1.11.0-6.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-six-1.9.0-2.el7.noarch
              file /usr/lib/python2.7/site-packages/backports/__init__.pyc from install of python2-backports-1.0-16.module+el8.9.0+90013+b7cb8eec.x86_64 conflicts with file from package python-backports-1.0-8.el7.x86_64
              file /usr/lib/python2.7/site-packages/backports/__init__.pyo from install of python2-backports-1.0-16.module+el8.9.0+90013+b7cb8eec.x86_64 conflicts with file from package python-backports-1.0-8.el7.x86_64
              file /usr/lib64/python2.7/site-packages/backports/__init__.pyc from install of python2-backports-1.0-16.module+el8.9.0+90013+b7cb8eec.x86_64 conflicts with file from package python-backports-1.0-8.el7.x86_64
              file /usr/lib64/python2.7/site-packages/backports/__init__.pyo from install of python2-backports-1.0-16.module+el8.9.0+90013+b7cb8eec.x86_64 conflicts with file from package python-backports-1.0-8.el7.x86_64
              file /usr/lib/python2.7/site-packages/backports/ssl_match_hostname/__init__.pyc from install of python2-backports-ssl_match_hostname-3.5.0.1-12.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
              file /usr/lib/python2.7/site-packages/backports/ssl_match_hostname/__init__.pyo from install of python2-backports-ssl_match_hostname-3.5.0.1-12.module+el8.9.0+90013+b7cb8eec.noarch conflicts with file from package python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
    Hint: If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process.

The proxy is well setup in dnf.conf and there is no issue on yum/dnf update. Maybe i miss a dependency or whatever ?

pirat89 commented 3 weeks ago

@DeuxCatPotes hi, in this case you need to ask on the project providing this upgrade functionality, as most likely we speak here about OL.

The --oraclelinux is unknown option for us so we do not know what everything is there happening. I cannot say whether it's issue or whether it's expected behavior and you want to ask for support to deal with third-party packages. From the error it's clear that some el7 rpms are not marked to be removed and in the same time additional rpms are wanted to be installed, which are with conflict with original ones. There are several possibilities what's exactly the problem with different solutions and as this problem is out of our scope and it does not seem to be bug in our current solution, I suggest you to ask in the project or vendor for help. In case you could reproduce the very same problem on RHEL just with RHEL packages intalled, it would be mostly bug in PES data, which we could update. but so far it does not seem to me to be the case. In some cases, it could help you to mark conflicting el7 packages to be removed explicitely, via /etc/leapp/transaction/to_remove file.

DeuxCatPotes commented 3 weeks ago

hi @pirat89 (great surname), thx for your reply.

I use the oracle linux version but i have similar issue with elevate for what i remembered.

if you are using oracle linux leapp* packages, you need to report it to the oracle linux not an easy thing to do, i will investigate on that.

The option --oraclelinux just allow some repositories https://docs.oracle.com/en/operating-systems/oracle-linux/8/leapp/leapp-SupportedRepositoriesinLeappUpgrades.html#repo-auto-enabling

Agree with your analysis.

For my culture what is PES data ?

pirat89 commented 2 weeks ago

hi @pirat89 (great surname), thx for your reply.

thanks :-D

For my culture what is PES data ?

Package Evolution Service data. Located in /etc/leapp/files/pes-events.json. This data is used to find out what packages should be installed on the target system, based on packages installed on the source system. In this case, it affects only packages signed by the distribution - note that behaviour could differ in Elevate and OL, I haven't analyzed changes downstream projects.

So e.g. when pkg A splits to B & C, we remove A and install B & C. etc. It covers "semantic" between packages that cannot be covered by RPM dependencies or it covers also an incorrectly set/missing attributes (Provides, Obsoletes, ...) in some cases. So it helps DNF to understand what to do (and if correct, it prevents number of such conflicts). This data is manually crafted and in this project we update them from our internal database.

In case you would like to try to modify them in your machine, here is json schema, with highlighted line explaining types of PES events:

In case you would like to apply them to third-party rpms, it's possible using devel envars, saying that all packages are signed by the distribution (note this link will be soon malfunction as we are working on complete redesign of upstream documentation):

So e.g. run leapp like:

LEAPP_UNSUPPORTED=1 LEAPP_DEVEL_RPMS_ALL_SIGNED=1 leapp ....