Bug 1231074

Summary: rhsmcertd update is not automatically regenerating consumer cert against SAM1.4.
Product: Red Hat Enterprise Linux 6 Reporter: qianzhan
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WORKSFORME QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: bcourt, gxing, qianzhan, wpoteat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 923159 Environment:
Last Closed: 2015-12-03 07:08:47 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: 923159, 1425722    
Bug Blocks: 863175    

Comment 2 William Poteat 2015-06-12 18:20:44 UTC
Not a high enough priority for this point in the 6.7 cycle.

Comment 4 Barnaby Court 2015-12-02 19:07:42 UTC
The bug this was cloned from was resolved a year before this bug was created. Please retest using the RHEL 6.7 release build.

Comment 5 qianzhan 2015-12-03 07:08:47 UTC
(In reply to Barnaby Court from comment #4)
> The bug this was cloned from was resolved a year before this bug was
> created. Please retest using the RHEL 6.7 release build.

I retested by this build: http://download.englab.nay.redhat.com/pub/rhel/released/RHEL-6/6.7/Server/

And its Version-Release numbers are the same with that of comment 0:
subscription-manager: 1.14.10-1.el6
python-rhsm: 1.14.3-1.el6

Steps to Reproduce:
1.
[root@dhcp-129-191 ~]# subscription-manager register
Username: admin
Password: 
The system has been registered with ID: a95ba9f9-87d8-4e29-8f12-1d59d57cfead 

[root@dhcp-129-191 ~]# rct cat-cert /etc/pki/consumer/cert.pem | grep Date
	Start Date: 2015-12-03 06:46:04+00:00
	End Date: 2031-12-03 06:46:04+00:00


2. Fast-forward time into the future on both the SAM candlepin server and the subscription-manager system.

(1) Set date on client
[root@dhcp-129-191 ~]# date -s '+15 year +9 month +2 day'
Fri Sep  5 00:50:24 EDT 2031

(2) Set date on SAM
[root@samserv ~]# date -s 'Fri Sep  5 00:50:24 EDT 2031'
Fri Sep  5 00:50:24 EDT 2031

3. Restart rhsmcertd and check for certificate updates with the server.

[root@dhcp-129-191 ~]# service rhsmcertd restart
Stopping rhsmcertd...                                      [  OK  ]
Starting rhsmcertd...                                      [  OK  ]
[root@dhcp-129-191 ~]# sleep 120
[root@dhcp-129-191 ~]# tail -f /var/log/rhsm/rhsmcertd.log
Fri Sep  5 00:51:13 2031 [INFO] rhsmcertd is shutting down...
Fri Sep  5 00:51:13 2031 [INFO] Starting rhsmcertd...
Fri Sep  5 00:51:13 2031 [INFO] Auto-attach interval: 1440.0 minute(s) [86400 second(s)]
Fri Sep  5 00:51:13 2031 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Fri Sep  5 00:51:13 2031 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Fri Sep  5 00:53:15 2031 [INFO] (Auto-attach) Certificates updated.
Fri Sep  5 00:53:16 2031 [INFO] (Cert Check) Certificates updated.
^C

4. Check the start/end time of consumer cert.
[root@dhcp-129-191 ~]# rct cat-cert /etc/pki/consumer/cert.pem | grep Date
	Start Date: 2031-09-05 04:52:38+00:00
	End Date: 2047-09-05 04:52:38+00:00

So close this bug as WORKSFORME.