Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2168835 - Remote Execution to install errata need to use update-minimal --nobest [NEEDINFO]
Summary: Remote Execution to install errata need to use update-minimal --nobest
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-10 07:43 UTC by Andrea Perotti
Modified: 2024-04-03 11:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-03 11:26:31 UTC
Target Upstream Version:
Embargoed:
aruzicka: needinfo? (wclark)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 36087 0 Normal New Remote Execution sometimes needs to use update-minimal --nobest to install errata 2023-02-13 14:23:30 UTC
Red Hat Issue Tracker SAT-23145 0 None None None 2024-02-09 06:22:19 UTC

Description Andrea Perotti 2023-02-10 07:43:44 UTC
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:


# 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:

# 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:


Note You need to log in before you can comment on or make changes to this bug.