Bug 1849572

Summary: rhsmcertd will update the syspurpose to the Satellite/RHSM server on every certCheck even there is no change [rhel-8.2.0.z]
Product: Red Hat Enterprise Linux 8 Reporter: RHEL Program Management Team <pgm-rhel-tools>
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, jsefler, redakkan, wpoteat
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.0Flags: 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: 1849088 Environment:
Last Closed: 2020-09-08 09:37:25 UTC Type: ---
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: 1849088    
Bug Blocks:    

Comment 3 Craig Donnelly 2020-07-22 23:44:47 UTC
Verifying with subscription-manager-1.26.18-1.el8_2 / python3-syspurpose-1.26.18-1.el8_2:

Showing issue with 8.2.z (subscription-manager-1.26.17-1.el8_2.x86_64):

[root@dhcp-8-29-11 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched
--------
2020-07-22T19:32:35 [I|app|771faeb2] Started PUT "/rhsm/consumers/05ac6290-26e0-423b-b1b6-b80786d6f05d" for 10.8.29.11 at 2020-07-22 19:32:35 -0400
2020-07-22T19:32:35 [I|app|771faeb2] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2020-07-22T19:32:35 [I|app|771faeb2]   Parameters: {"role"=>"", "addOns"=>[], "usage"=>"", "serviceLevel"=>"Premium", "id"=>"05ac6290-26e0-423b-b1b6-b80786d6f05d"}

Checking against rhsmcertd checkin:

[root@dhcp-8-29-11 ~]# subscription-manager config | grep -e splay -e checkin
   certcheckinterval = 1
   splay = 0

[root@dhcp-8-29-11 ~]# systemctl restart rhsmcertd
---------
Wed Jul 22 19:35:31 2020 [INFO] (Cert Check) Certificates updated.
Wed Jul 22 19:35:32 2020 [INFO] (Auto-attach) Certificates updated.
---------
2020-07-22T19:35:32 [I|app|af812de4] Started PUT "/rhsm/consumers/05ac6290-26e0-423b-b1b6-b80786d6f05d" for 10.8.29.11 at 2020-07-22 19:35:32 -0400
2020-07-22T19:35:32 [I|app|af812de4] Processing by Katello::Api::Rhsm::CandlepinProxiesController#facts as JSON
2020-07-22T19:35:32 [I|app|af812de4]   Parameters: {"role"=>"", "addOns"=>[], "usage"=>"", "serviceLevel"=>"Premium", "id"=>"05ac6290-26e0-423b-b1b6-b80786d6f05d"}

^^^ Issue occurs, now updating to test version:

[root@dhcp-8-29-11 ~]# yum update
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 1:14:00 ago on Wed 22 Jul 2020 06:22:40 PM EDT.
Dependencies resolved.
==============================================================================================================================================================
 Package                                         Architecture    Version                   Repository                                                    Size
==============================================================================================================================================================
Upgrading:
 dnf-plugin-subscription-manager                 x86_64          1.26.18-1.el8_2           brew-task-repo-subscription-manager-1.26.18-1.el8_2          277 k
 python3-subscription-manager-rhsm               x86_64          1.26.18-1.el8_2           brew-task-repo-subscription-manager-1.26.18-1.el8_2          347 k
 python3-syspurpose                              x86_64          1.26.18-1.el8_2           brew-task-repo-subscription-manager-1.26.18-1.el8_2          286 k
 subscription-manager                            x86_64          1.26.18-1.el8_2           brew-task-repo-subscription-manager-1.26.18-1.el8_2          1.1 M
 subscription-manager-rhsm-certificates          x86_64          1.26.18-1.el8_2           brew-task-repo-subscription-manager-1.26.18-1.el8_2          250 k

Transaction Summary
==============================================================================================================================================================
Upgrade  5 Packages

Total download size: 2.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): python3-syspurpose-1.26.18-1.el8_2.x86_64.rpm                                                                          510 kB/s | 286 kB     00:00    
(2/5): dnf-plugin-subscription-manager-1.26.18-1.el8_2.x86_64.rpm                                                             473 kB/s | 277 kB     00:00    
(3/5): python3-subscription-manager-rhsm-1.26.18-1.el8_2.x86_64.rpm                                                           576 kB/s | 347 kB     00:00    
(4/5): subscription-manager-rhsm-certificates-1.26.18-1.el8_2.x86_64.rpm                                                      1.9 MB/s | 250 kB     00:00    
(5/5): subscription-manager-1.26.18-1.el8_2.x86_64.rpm                                                                        5.2 MB/s | 1.1 MB     00:00    
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                         2.9 MB/s | 2.2 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                      1/1 
  Running scriptlet: subscription-manager-rhsm-certificates-1.26.18-1.el8_2.x86_64                                                                        1/1 
  Upgrading        : subscription-manager-rhsm-certificates-1.26.18-1.el8_2.x86_64                                                                       1/10 
  Upgrading        : python3-subscription-manager-rhsm-1.26.18-1.el8_2.x86_64                                                                            2/10 
  Upgrading        : python3-syspurpose-1.26.18-1.el8_2.x86_64                                                                                           3/10 
  Upgrading        : dnf-plugin-subscription-manager-1.26.18-1.el8_2.x86_64                                                                              4/10 
  Upgrading        : subscription-manager-1.26.18-1.el8_2.x86_64                                                                                         5/10 
  Running scriptlet: subscription-manager-1.26.18-1.el8_2.x86_64                                                                                         5/10 
  Running scriptlet: subscription-manager-1.26.17-1.el8_2.x86_64                                                                                         6/10 
  Cleanup          : subscription-manager-1.26.17-1.el8_2.x86_64                                                                                         6/10 
  Running scriptlet: subscription-manager-1.26.17-1.el8_2.x86_64                                                                                         6/10 
  Cleanup          : python3-syspurpose-1.26.17-1.el8_2.x86_64                                                                                           7/10 
  Cleanup          : python3-subscription-manager-rhsm-1.26.17-1.el8_2.x86_64                                                                            8/10 
  Cleanup          : subscription-manager-rhsm-certificates-1.26.17-1.el8_2.x86_64                                                                       9/10 
  Cleanup          : dnf-plugin-subscription-manager-1.26.17-1.el8_2.x86_64                                                                             10/10 
  Running scriptlet: dnf-plugin-subscription-manager-1.26.17-1.el8_2.x86_64                                                                             10/10 
  Verifying        : dnf-plugin-subscription-manager-1.26.18-1.el8_2.x86_64                                                                              1/10 
  Verifying        : dnf-plugin-subscription-manager-1.26.17-1.el8_2.x86_64                                                                              2/10 
  Verifying        : python3-subscription-manager-rhsm-1.26.18-1.el8_2.x86_64                                                                            3/10 
  Verifying        : python3-subscription-manager-rhsm-1.26.17-1.el8_2.x86_64                                                                            4/10 
  Verifying        : python3-syspurpose-1.26.18-1.el8_2.x86_64                                                                                           5/10 
  Verifying        : python3-syspurpose-1.26.17-1.el8_2.x86_64                                                                                           6/10 
  Verifying        : subscription-manager-1.26.18-1.el8_2.x86_64                                                                                         7/10 
  Verifying        : subscription-manager-1.26.17-1.el8_2.x86_64                                                                                         8/10 
  Verifying        : subscription-manager-rhsm-certificates-1.26.18-1.el8_2.x86_64                                                                       9/10 
  Verifying        : subscription-manager-rhsm-certificates-1.26.17-1.el8_2.x86_64                                                                      10/10 
Installed products updated.

Upgraded:
  dnf-plugin-subscription-manager-1.26.18-1.el8_2.x86_64                           python3-subscription-manager-rhsm-1.26.18-1.el8_2.x86_64                   
  python3-syspurpose-1.26.18-1.el8_2.x86_64                                        subscription-manager-1.26.18-1.el8_2.x86_64                                
  subscription-manager-rhsm-certificates-1.26.18-1.el8_2.x86_64                   

Complete!

-----

[root@dhcp-8-29-11 ~]# rpm -q subscription-manager
subscription-manager-1.26.18-1.el8_2.x86_64

[root@dhcp-8-29-11 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Matched

>> No PUTs observed for syspurpose with status (bonus!)

Testing rhsmcertd checkin:

[root@dhcp-8-29-11 ~]# systemctl restart rhsmcertd;tail -f /var/log/rhsm/rhsmcertd.log
---
Wed Jul 22 19:38:50 2020 [INFO] Waiting 2.0 minutes plus 0 splay seconds [120 seconds total] before performing first cert check.
Wed Jul 22 19:40:53 2020 [INFO] (Cert Check) Certificates updated.
Wed Jul 22 19:40:54 2020 [INFO] (Auto-attach) Certificates updated.

------------
>> No PUTs observed for syspurpose attribute upload on rhsmcertd checkin.

VERIFIED.

Comment 7 errata-xmlrpc 2020-09-08 09:37:25 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:3649