Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Description of problem:
Having many repos enabled on a system, various RHSM tasks take longer - linearly to the number of enabled repos (even custom ones). Particular tasks/requests that take longer:
(*) rhsmcertd-worker doing certs check (by default, every 4hours)
(*) subscription-manager repos --list
(*) subscription-manager repos --[enable|disable]=..
(*) subscription-manager attach --pool=..
For _each_ enabled repo, below requests are raised:
1.2.3.4 - - [01/Jan/2020:11:46:50 +0100] "GET /rhsm/consumers/a396bdc4-ed28-402d-831b-96d8cae1b0ae/certificates/serials HTTP/1.1" 200 63 "-" "RHSM/1.0 (cmd=rhsmcertd-worker)"
1.2.3.4 - - [01/Jan/2020:11:46:50 +0100] "GET /rhsm/status HTTP/1.1" 200 377 "-" "RHSM/1.0 (cmd=rhsmcertd-worker)"
1.2.3.4 - - [01/Jan/2020:11:46:50 +0100] "GET /rhsm/consumers/a396bdc4-ed28-402d-831b-96d8cae1b0ae HTTP/1.1" 200 22271 "-" "RHSM/1.0 (cmd=rhsmcertd-worker)"
1.2.3.4 - - [01/Jan/2020:11:46:50 +0100] "GET /rhsm/consumers/a396bdc4-ed28-402d-831b-96d8cae1b0ae/content_overrides HTTP/1.1" 200 2980 "-" "RHSM/1.0 (cmd=rhsmcertd-worker)"
1.2.3.4 - - [01/Jan/2020:11:46:50 +0100] "GET /rhsm/consumers/a396bdc4-ed28-402d-831b-96d8cae1b0ae/release HTTP/1.1" 200 19 "-" "RHSM/1.0 (cmd=rhsmcertd-worker)"
Having 50 repos enabled, 50 such bunches of requests are made. Invoking those requests by thousands of clients then generates redundantly high load to Satellite (as well as to our customer portal candlepin instance).
RHSM (subscription-manager / rhsmcertd / .. programs) should rather cache the data during one invocation since the very first query, and re-use the information.
Version-Release number of selected component (if applicable):
Sat6.6.1 / subscription-manager-rhsm-1.24.13-3.el7_7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Create 10+ custom products and repos.
2. Enable all of them (plus some Red Hat repo) on a client system
3. Run either command:
rhsmcertd-worker ( or wait for the automated certs check itself)
subscription-manager repos --list
subscription-manager repos --[enable|disable]=..
subscription-manager attach --pool=..
4. meanwhile, check requests made against Satellite:
tail -f /var/log/httpd/foreman-ssl_access_ssl.log
Actual results:
The five requests enumerated above will be fired against Satellite as many times as the number of enabled repos is.
Expected results:
Ideally, there should be just one such bunch of requests.
Additional info:
This is rather RHEL/rhsm bug / improvement request, though it mainly affects Satellite customers - let engineering decides proper product and component.
Backport to RHEL8 is _not_ needed as this BZ affects yum systems but not dnf ones.
This does not happen in RHEL8 / on dnf systems, as dnf must cache its config somehow. Cf the fix
https://github.com/candlepin/subscription-manager/pull/2204/files
and mimic the underlying calls manually.
On RHEL7 when I run a python script:
import yum
yb = yum.YumBase()
yb.conf
(what exactly _obtain_mappings_yum did before the patch), then:
1) I see "Loaded plugins: product-id, subscription-manager" (cf. the bz1741183 complaint)
2) the latest call "yb.conf" triggers 5 requests against RHSM server (to URIs for /rhsm/, /rhsm/status, and for consumer serials, content_overrides + release)
This is executed for each repo enabled when running my reproducer.
On RHEL8 when I run python script:
import dnf
db = dnf.dnf.Base()
db.conf
then no requests are raised against RHSM server, at all.
This means that both this bz1787197 and bz1741183 are applicable to yum systems but not dnf systems.
So the backport of bz1741183 fix to RHEL8 is not required.