Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-23145

Remote Execution to install errata need to use update-minimal --nobest

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 6.11.0
    • Remote Execution
    • False
    • Hide

      None

      Show
      None
    • False
    • CLOSED
    • 4,300
    • No
    • Endeavour
    • Important

      Description of problem:

      When trying to install multiple errata for same package or with shared deps, is possible that two deps collide, causing the failure in the installation of the errata.

      Example below is done on a RHEL 8.2, as per customer scenario:

      1. yum update-minimal --advisory=RHSA-2022:2092 --advisory=RHSA-2021:2359
        Updating Subscription Management repositories.
        This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
        Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
        Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)

      Error:
      Problem: package dhcp-client-12:4.3.6-44.el8_4.1.x86_64 requires libdns-export.so.1112()(64bit), but none of the providers can be installed

      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-4.el8_4.x86_64
      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-3.el8.x86_64
      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-6.el8.x86_64
      • cannot install the best update candidate for package dhcp-client-12:4.3.6-40.el8.x86_64
      • cannot install the best update candidate for package bind-export-libs-32:9.11.13-3.el8.x86_64
        (try to add '-allowerasing' to command line to replace conflicting packages or 'skip-broken' to skip uninstallable packages or '-nobest' to use not only best candidate packages)

      But if we use the `--nobest` option - like yum suggest to do, we have the appropriate outcome, equal to what will happen if we would install the erratas one by one:

      1. yum update-minimal --nobest --advisory=RHSA-2022:2092 --advisory=RHSA-2021:2359
        Updating Subscription Management repositories.
        This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
        Last metadata expiration check: 1:40:38 ago on Thu 09 Feb 2023 12:46:29 PM CET.
        Dependencies resolved.

      Problem: package dhcp-client-12:4.3.6-44.el8_4.1.x86_64 requires libdns-export.so.1112()(64bit), but none of the providers can be installed

      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-4.el8_4.x86_64
      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-3.el8.x86_64
      • cannot install both bind-export-libs-32:9.11.36-3.el8.x86_64 and bind-export-libs-32:9.11.26-6.el8.x86_64
      • cannot install the best update candidate for package dhcp-client-12:4.3.6-40.el8.x86_64
      • cannot install the best update candidate for package bind-export-libs-32:9.11.13-3.el8.x86_64
        ====================================================================================================================================================================================================================================
        Package Architecture Version Repository Size
        ====================================================================================================================================================================================================================================
        Upgrading:
        bind-export-libs x86_64 32:9.11.36-3.el8 rhel-8-for-x86_64-baseos-rpms 1.1 M
        dhcp-client x86_64 12:4.3.6-48.el8_7.1 rhel-8-for-x86_64-baseos-rpms 318 k
        dhcp-common noarch 12:4.3.6-48.el8_7.1 rhel-8-for-x86_64-baseos-rpms 207 k
        dhcp-libs x86_64 12:4.3.6-48.el8_7.1 rhel-8-for-x86_64-baseos-rpms 148 k
        Skipping packages with conflicts:
        (add '--best --allowerasing' to command line to force their upgrade):
        bind-export-libs x86_64 32:9.11.26-3.el8 rhel-8-for-x86_64-baseos-rpms 1.1 M
        bind-export-libs x86_64 32:9.11.26-4.el8_4 rhel-8-for-x86_64-baseos-rpms 1.1 M
        bind-export-libs x86_64 32:9.11.26-6.el8 rhel-8-for-x86_64-baseos-rpms 1.1 M
        bind-export-libs x86_64 32:9.11.36-3.el8 rhel-8-for-x86_64-baseos-rpms 1.1 M
        Skipping packages with broken dependencies:
        dhcp-client x86_64 12:4.3.6-44.el8_4.1 rhel-8-for-x86_64-baseos-rpms 318 k

      To obtain this, we just need to update the job_templates as below:

      In order to adjust the update-minimal to include it in the Sat6, you can do the following

      Install errata by search query - Katello Script Default

      from

      <%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>

      to

      <%= render_template('Package Action - Script Default', :action => 'update-minimal --nobest', :package => advisories) %>

      Install Errata - Katello Ansible Default

      from

      <%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal #

      {advisories}") -%>

      to

      <%= render_template('Run Command - Ansible Default', :command => "yum -y update-minimal --nobest #{advisories}

      ") -%>

      Install Errata - Katello Script Default

      from

      <%= render_template('Package Action - Script Default', :action => 'update-minimal', :package => advisories) %>

      to

      <%= render_template('Package Action - Script Default', :action => 'update-minimal --nobest', :package => advisories) %>

      Version-Release number of selected component (if applicable):
      Satellite 6.11

      How reproducible:
      Always

      Steps to Reproduce:
      1. try to install advisories with common dependencies

      Actual results:
      it fails

      Expected results:
      to have them installed, and addressing the dependecies per each errata in a smart way

      Additional info:

            jira-bugzilla-migration RH Bugzilla Integration
            jira-bugzilla-migration RH Bugzilla Integration
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: