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.

Bug 1849088

Summary: rhsmcertd will update the syspurpose to the Satellite/RHSM server on every certCheck even there is no change
Product: Red Hat Enterprise Linux 8 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: cdonnell, csnyder, qianzhan, redakkan, yanpliu
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.3Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1849572 (view as bug list) Environment:
Last Closed: 2020-11-04 01:39:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1849572    

Description John Sefler 2020-06-19 15:16:47 UTC
This bug was initially created as a copy of Bug #1838012

I am copying this bug because: 



Description of problem:
rhsmcertd will update the syspurpose to the Satellite/RHSM server on every certCheck even there is no change. This issue is causing performance issue to the Satellite server that managing thousands of hosts. Each unnecessary syspurpose update will create a task in the Satellite and Candlepin. Candlepin will also trigger event message to the Qpid broker causing Satellite to busy processing the messages.

Steps to Reproduce:
1. To make it easier to reproduce, change the certCheckInterval in /etc/rhsm/rhsm.conf to 1 minute
2. systemctl restart rhsmcertd
3. On the Satellite tail the foreman production.log and wait for about 1 min

tail -f /var/log/foreman/production.log

Actual results:
Seeing the following PUT request every minute even though syspurpose is not set or changed

Started PUT "/rhsm/consumers/xxxx-xxxx-xxxx-xxxx" for xx.xx.xx.xx at 2020-05-20 11:13:18 +0000
Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
   Parameters: {"usage"=>"", "addOns"=>[], "role"=>"", "serviceLevel"=>"", "id"=>"xxxx-xxxx-xxxx-xxxx"}


Imagine that Satellite is managing 10K of hosts, each will run the certCheck every 4 hours, then Satellite will need to handle about 42 of this PUT request every minute.


Expected results:
Only send the PUT request if the local data is changed

Comment 6 Craig Donnelly 2020-07-17 21:24:56 UTC
Verifying on python3-syspurpose-1.27.9-1.el8.x86_64 / subscription-manager-1.27.9-1.el8.x86_64

System is registered to Satellite 6.6
Splay set to 0, rhsmcertd checkins set to 1 minute.

Manipulating syspurpose is still saved and PUT to sat:

[root@dhcp-8-30-168 ~]# syspurpose set-role "RHEL Server"
role set to "RHEL Server".
---
020-07-17T17:20:33 [I|app|e5ea1156] Started PUT "/rhsm/consumers/a22de5de-8221-43da-8cd4-229ee1ce3587" for 10.16.6.78 at 2020-07-17 17:20:33 -0400
2020-07-17T17:20:33 [I|app|e5ea1156] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2020-07-17T17:20:33 [I|app|e5ea1156]   Parameters: {"role"=>"RHEL Server", "addOns"=>[], "usage"=>"", "serviceLevel"=>"Premium", "id"=>"a22de5de-8221-43da-8cd4-229ee1ce3587"}

Further checkins are /not/ repeatedly issuing PUTs for syspurpose facts. (Nothing to show)

Logged a separate bug for what appears to be an unrelated failure: package profile seems to be uploaded excessively, which may be related to some form of caching issue - BZ 1858296

VERIFIED for the improvement of not spamming unchanged syspurpose facts to registration endpoint.

Comment 10 errata-xmlrpc 2020-11-04 01:39:09 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 (subscription-manager bug fix and enhancement update), 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/RHBA-2020:4460