Bug 1957871 - [RFE} Client rpms created in RHUI don't prevent auto-enable of subscription manager plugins
Summary: [RFE} Client rpms created in RHUI don't prevent auto-enable of subscription m...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 3.1.9 - EOL
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 4.5.0
: 4.x
Assignee: RHUI Bug List
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-06 16:54 UTC by soham
Modified: 2023-08-09 14:18 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-09 14:18:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHUI-217 0 None None None 2022-03-10 16:48:14 UTC
Red Hat Product Errata RHSA-2023:4591 0 None None None 2023-08-09 14:18:04 UTC

Description soham 2021-05-06 16:54:59 UTC
Description of problem:
Client rpms created in RHUI don't prevent auto-enable of subscription manager plugins



Version-Release number of selected component (if applicable):
RHUI 3.1

How reproducible:

CLient rpms are intending to disable subscription manager plugins, but not to go so far as remove subscription-manager in case it's needed in the future if the machine is removed from rhui and placed elsewhere. However, as the rpm only disables the plugin any subsequent subscription-manager command being run, or more likely any other software running subscription-manager. At least one cloud agent runs this command, qualys-cloud-agent:

2021-05-04 06:52:10.740 [qualys-cloud-agent][65569]:[Debug]:[140432348211008]:Command: execution failed - table: UnixCommandOS, Mani
fest ID: 8,
<command>: subscription-manager list --consumed 2>&1 ,
<stdout>: No consumed subscription pools were found.

Currently the rpm script has:

if [ "$1" = "1" ]; then  # 'install', not 'upgrade'
  # Disable RHN and subscription-manager plugin
  for f in /etc/yum/pluginconf.d/{subscription-manager.conf,rhnplugin.conf}; do
    if [ -f $f ]; then
      grep -iPq "enabled\s*=\s*(0|false|off)" $f || sed -i.save -e 's/^enabled.*/enabled = 0/g' $f || :
    fi
  done
fi

This script should be also disabling the auto_enable_yum_plugins in the /etc/rhsm/rhsm.conf. This could be accomplished with the addition of the following stanza:

if exists file /etc/rhsm/rhsm.conf, then
    set auto_enable_yum_plugins = 0
fi

The absence of this causes the auto-enable of the subscription manager plugin and output that is perceived as erroneous and create non-value added support load on any device running the qualsys-support-agent or any other software that runs a subscription-manager command:

 > This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.


Additional info:

Comment 5 errata-xmlrpc 2023-08-09 14:18:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHUI 4.5.0 release - Security, Bug Fixes, and Enhancements), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:4591


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