• Icon: Sub-task Sub-task
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • 2.2.0
    • None
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • 1
    • Testable

      As a result of RHELC-1747 the check for availability of custom repositories provided to the convert2rhel command was moved from system_checks to the pre_ponr_changes.
      Being a dependency of SUBSCRIBE_SYSTEM makes the check unreachable on EL7 systems.
      That is because even though we want to check the availability after the SUBSCRIBE_SYSTEM action is successful, we pass --disablerepo=custom-repo-provided multiple times before we even get to the check.
      Consider this scenario - with human error involved, a typo appears in the custom repository provided to the command: convert2rhel ... --enablerepo=myflawless-repository instead of convert2rhel ... --enablerepo=my-flawless-repository.
      On EL8+ systems, the dnf is able to handle the non-existent (not configured) repository gracefully and tries to do as much as it can without considering forementioned.

      # dnf update --disablerepo=nevim
      Updating Subscription Management repositories.
      Unable to read consumer identity
      
      This system is not registered with an entitlement server. You can use subscription-manager to register.
      
      No repository match: nevim
      Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                                                                                                              4.5 MB/s | 722 kB     00:00    
      Red Hat Universal Base Image 8 (RPMs) - AppStream                                                                                                                                            16 MB/s | 3.2 MB     00:00    
      Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                                                                                                                   1.1 MB/s | 186 kB     00:00    
      Dependencies resolved.
      ============================================================================================================================================================================================================================
       Package                                              Architecture                                 Version                                                    Repository                                               Size
      ============================================================================================================================================================================================================================
      Upgrading:
       libsemanage                                          x86_64                                       2.9-9.el8_6                                                ubi-8-baseos-rpms                                       168 k
       openssl-libs                                         x86_64                                       1:1.1.1k-14.el8_6                                          ubi-8-baseos-rpms                                       1.5 M
      Installing dependencies:
       openssl                                              x86_64                                       1:1.1.1k-14.el8_6                                          ubi-8-baseos-rpms                                       711 k
      Installing weak dependencies:
       openssl-pkcs11                                       x86_64                                       0.4.10-3.el8                                               ubi-8-baseos-rpms                                        66 k
      
      Transaction Summary
      ============================================================================================================================================================================================================================
      Install  2 Packages
      Upgrade  2 Packages
      
      Total download size: 2.4 M
      

      On the other hand yum just crashes without performing any other action.

      # yum update --disablerepo=nevim
      Loaded plugins: ovl, product-id, search-disabled-repos, subscription-manager
      
      This system is not registered with an entitlement server. You can use subscription-manager to register.
      
      
      
      Error getting repository data for nevim, repository not found
      

      For that reason, it was actually beneficial to fail fast and early with the custom repo availability check, in my opinion.

      With the current implementation, some of the previous checks are unable to provide valid results (up-to-date packages checks)

      [2024-10-24T09:21:28+0000] TASK - [Prepare: Check if the installed packages are up-to-date] **********
      WARNING - There was an error while checking whether the installed packages are up-to-date. Having an updated system is an important prerequisite for a successful conversion. Consider verifying the system is up to date manually before proceeding with the conversion. Error getting repository data for fake-rhel-8-for-x86_64-baseos-rpms, repository not found
      PACKAGE_UPDATES has succeeded
      

      more importantly, a backup of excluded packages fails because we try to disable the unavailable repository.

      ERROR - (ERROR) REMOVE_SPECIAL_PACKAGES::SPECIAL_PACKAGE_REMOVAL_FAILED - Failed to remove some packages necessary for the conversion.
       Description: The cause of this error is unknown, please look at the diagnosis for more information.
       Diagnosis: Couldn't download the python-requests-2.6.0-10.el7.noarch package. This means we will not be able to do a complete rollback and may put the system in a broken state.
      Check to make sure that the Oracle Linux Server repositories are enabled and the package is updated to its latest version.
      If you would rather disregard this check set the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK=1'.
       Remediations: N/A
      

      This causes a chain reaction of dependencies to skip the subsequent actions.

      ERROR - Skipped PRE_SUBSCRIPTION. Skipped because REMOVE_SPECIAL_PACKAGES was not successful
      ERROR - Skipped SUBSCRIBE_SYSTEM. Skipped because PRE_SUBSCRIPTION was not successful
      ERROR - Skipped CUSTOM_REPOSITORIES_ARE_VALID. Skipped because SUBSCRIBE_SYSTEM was not successful
      

      Therefore, we won't ever get to the point of the custom repository availability check.

      Additionally, the information from the report are kind of inconclusive and from my perspective can only be understood by a trained eye.
      There is a mention of Error getting repository data for fake-rhel-8-for-x86_64-baseos-rpms, repository not found but it is provided under a warning header, and the whole run is invalidated by the error while "Failed to remove some packages necessary for the conversion."

      LOG: https://artifacts.osci.redhat.com/testing-farm/9a1415eb-a321-46e0-9f4d-712832d075ff/work-non-destructiveoeqlscmx/plans/tier0/core/non-destructive/execute/data/guest/default-0/tests/integration/tier0/non-destructive/custom-repository/custom_invalid_repo_provided-14/output.txt

              ddiblik@redhat.com Daniel Diblik
              rhel-process-autobot RHEL Jira bot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: