'yum update' fails to update third party packages after enabling SCA with "none of the providers can be installed"

Solution Verified - Updated

Environment

Satellite 6.13 or older

Issue

After enabling SCA yum update fails with package X requires Z but none of the providers can be installed on third party packages.

Example:

...
Error:
 Problem 1: package MariaDB-shared-10.5.20-1.el8.x86_64 requires MariaDB-common, but none of the providers can be installed
  - cannot install the best update candidate for package mariadb-connector-c-3.1.11-2.el8_3.x86_64
  - package MariaDB-common-10.5.18-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.19-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.20-1.el8.x86_64 is filtered out by modular filtering
 Problem 2: package MariaDB-shared-10.5.20-1.el8.x86_64 requires MariaDB-common, but none of the providers can be installed
  - cannot install the best update candidate for package mariadb-connector-c-config-3.1.11-2.el8_3.noarch
  - package MariaDB-common-10.5.18-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.19-1.el8.x86_64 is filtered out by modular filtering
  - package MariaDB-common-10.5.20-1.el8.x86_64 is filtered out by modular filtering
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Resolution

This script will disable all repositories on a Client Host and re-enable only those that have a package installed on the system.

org="YOUR_ORGANIZATION"
subscription-manager repos --disable "${org}_*"
for repo in $(yum list installed  | awk '{print $3}' | grep "${org}_ | sed 's/^@//' | sort | uniq)
do
    subscription-manager repos --enable $repo
done

For more KB articles/solutions related to Red Hat Satellite 6.x Client Subscription Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Client Subscription Issues

Root Cause

Before SCA activation repository access was limited by subscription-manager attach --pool but with SCA all third party repositories are available to the Content host. Depending on the Content View & third party software design, update to next software version could be a dependency issue insolvable for rpm.

Diagnostic Steps

yum repolist all shows multiple repositories for same product. MariaDB on this example.

# yum repolist all
...
ORGANIZATION_MariaDB_MaxScale_RHEL8_MariaDB_MaxScale_6_4_RHEL8    MariaDB MaxScale 6.4 RHEL8    enabled
ORGANIZATION_MariaDB_RHEL8_MariaDB_10_5_RHEL8                     MariaDB 10.5 RHEL8            enabled
...
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.