Bug 1828657

Summary: /etc/cron.daily/rhsmd fails to recognize rhsmd.processtimeout configuration [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: high Docs Contact:
Priority: high    
Version: 8.2CC: apmukher, bkurt, jsefler, redakkan, wpoteat
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.26.17-1.el8_2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1827708 Environment:
Last Closed: 2020-06-10 08:30:07 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: 1827708    
Bug Blocks:    

Comment 3 John Sefler 2020-05-04 20:43:39 UTC
Demonstrating the original failure on a RHEL8.2 system that has been upgraded (not shown) from RHEL8.1 can result in the absence of a processTimeout configuration which can cause the follow issue...

[root@ibm-x3650m4-01-vm-14 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@ibm-x3650m4-01-vm-14 ~]# rpm -q subscription-manager
subscription-manager-1.26.16-1.el8.x86_64
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# grep --ignore-case "processTimeout" /etc/rhsm/rhsm.conf
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager config | grep --ignore-case "processTimeout"
   processtimeout = [300]
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager config --rhsmd.processtimeout=120
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# subscription-manager config | grep --ignore-case "processTimeout"
   processtimeout = 120
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# grep --ignore-case "processTimeout" /etc/rhsm/rhsm.conf
processtimeout = 120
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# time /etc/cron.daily/rhsmd

real	5m0.056s     <========== PROCESS TIMEDOUT AFTER 300 SECONDS, NOT 120 AS EXPECTED
user	0m0.610s
sys	0m0.120s

BANG! Although we correctly used subscription-manager config tool to change the value of the default "processtimeout" value (from 300 seconds) to a different value (120 seconds) the new configuration was not honored and the actual time it took /etc/cron.daily/rhsmd to timeout was 5 minutes (equal to the default 300 seconds)..

Now I will upgrade (not shown) subscription-manager to the fixed version and re-test...

[root@ibm-x3650m4-01-vm-14 ~]# rpm -q subscription-manager
subscription-manager-1.26.17-1.el8_2.x86_64
[root@ibm-x3650m4-01-vm-14 ~]# rpm -q subscription-manager --changelog | grep 1828657
- 1828657: Make rhsmd cron read 'processTimeout' case-insensitive
[root@ibm-x3650m4-01-vm-14 ~]# 
[root@ibm-x3650m4-01-vm-14 ~]# grep --ignore-case "processTimeout" /etc/rhsm/rhsm.conf
processtimeout = 120
[root@ibm-x3650m4-01-vm-14 ~]# time /etc/cron.daily/rhsmd

real	2m0.030s     <========== PROCESS TIMEDOUT AFTER 120 SECONDS, AS EXPECTED
user	0m0.576s
sys	0m0.109s

VERIFIED!  After applying the 8.2 zstream fix subscription-manager-1.26.17-1.el8_2, the "processtimeout" configuration in all lowercase was honored by /etc/cron.daily/rhsmd

Comment 5 errata-xmlrpc 2020-06-10 08:30:07 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, 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:2466