Bug 1445204 - 'Next System Certificate Check' and 'Next System Auto Attach' in About window are not accurate.
Summary: 'Next System Certificate Check' and 'Next System Auto Attach' in About window...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-25 09:08 UTC by qianzhan
Modified: 2017-08-01 19:23 UTC (History)
5 users (show)

Fixed In Version: subscription-manager-1.19.13-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:23:41 UTC
Target Upstream Version:


Attachments (Terms of Use)
Next_checks_time_is_not_right.png (320.09 KB, image/png)
2017-04-25 09:10 UTC, qianzhan
no flags Details
No mismatch in next system update (302.18 KB, image/png)
2017-05-18 11:38 UTC, Shwetha Kallesh
no flags Details


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1614 None None None 2017-04-28 21:02:43 UTC
Red Hat Product Errata RHBA-2017:2083 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description qianzhan 2017-04-25 09:08:43 UTC
Description of problem:
'Next System Certificate Check' and 'Next System Auto Attach' in About window are not accurate.

Version-Release number of selected component (if applicable):
subscription-manager: 1.19.9-1.el7
python-rhsm: 1.19.5-1.el7

How reproducible:
always

Steps to Reproduce:
1. Register RHEL-7.4-20170421.1 system against Satellite6.2.9.
2. Restart rhsmcertd service, and wait 2 minutes.
3. Check /var/log/rhsm/rhsmcertd.log, and record the cert update time:

[root@test ~]# cat /var/log/rhsm/rhsmcertd.log
Tue Apr 25 21:35:39 2017 [INFO] rhsmcertd is shutting down...
Tue Apr 25 21:35:39 2017 [INFO] Starting rhsmcertd...
Tue Apr 25 21:35:39 2017 [INFO] Auto-attach interval: 1440.0 minutes [86400 seconds]
Tue Apr 25 21:35:39 2017 [INFO] Cert check interval: 240.0 minutes [14400 seconds]
Tue Apr 25 21:35:39 2017 [INFO] Waiting 2.0 minutes plus 0 splay seconds [120 seconds total] before performing first auto-attach.
Tue Apr 25 21:35:39 2017 [INFO] Waiting 2.0 minutes plus 0 splay seconds [120 seconds total] before performing first cert check.
Tue Apr 25 21:37:57 2017 [INFO] (Cert Check) Certificates updated.
Tue Apr 25 21:38:21 2017 [INFO] (Auto-attach) Certificates updated.

4. Open About window on subscription-manager-gui, check the time for 'Next System Certificate Check' and 'Next System Auto Attach':


the time info on About window is not correct. Please see attachment 'Next_checks_time_is_not_right.png'



Actual results:
As step 4.

Expected results:
1) 'Next System Certificate Check' time should be: Tue Apr 25 21:37:57 plus 240 minutes.

2) 'Next System Auto Attach' time should be: Tue Apr 25 21:38:21 plus 1440 minutes.

Additional info:

Comment 2 qianzhan 2017-04-25 09:10:35 UTC
Created attachment 1273862 [details]
Next_checks_time_is_not_right.png

Comment 3 John Sefler 2017-04-25 18:55:33 UTC
Agreed!  I can also reproduce this failure (testing with rhsmcertd.splay=0).  I suspect these errors which are written to rhsm.log at exactly the time of the first check-in are blocking rhsmcertd-worker from writing new /var/run/rhsm/next_* files.

2017-04-25 14:42:52,499 [WARNING] rhsmcertd-worker:23859:MainThread @dmiinfo.py:86 - Error reading system DMI information: coercing to Unicode: need string or buffer, NoneType found
2017-04-25 14:42:52,618 [WARNING] rhsmcertd-worker:23859:MainThread @dmiinfo.py:86 - Error reading system DMI information: coercing to Unicode: need string or buffer, NoneType found

[root@jsefler-rhel7 ~]# ls -l /var/run/rhsm/*
-rw-r--r--. 1 root root 10 Apr 25 14:40 /var/run/rhsm/next_auto_attach_update
-rw-r--r--. 1 root root 10 Apr 25 14:40 /var/run/rhsm/next_cert_check_update

Notice that the timestamp of the /var/run/rhsm/next_* files remains unchanged from the time rhsmcertd is restarted and the hard 2 minute wait begins.

This bug might be a consequence of Bug 1444714.


Additional Info:  This bug is reproducible with both selinux Enforcing and Permissive.

Comment 4 Jiri Hnidek 2017-04-28 20:35:15 UTC
I can confirm this failure too.

John, why do you think this bug might be a consequence of https://bugzilla.redhat.com/show_bug.cgi?id=1444714 ? This bug was addressed in this PR: https://github.com/candlepin/subscription-manager/pull/1607. BTW: This bug fix is already present in subscription-manager-1.19.10-1.

Comment 5 John Sefler 2017-05-05 22:53:35 UTC
(In reply to Jiri Hnidek from comment #4)
> John, why do you think this bug might be a consequence of
> https://bugzilla.redhat.com/show_bug.cgi?id=1444714 ?

I changed my mind.  I do not think this bug is a consequence of bug 1444714. Instead...

I think this bug depends on the fix for selinux-policy Bug 1445494.

Comment 7 qianzhan 2017-05-16 03:21:48 UTC
Will verify this bug when next RHEL7.4 build comes out.

Comment 8 Shwetha Kallesh 2017-05-18 11:38:05 UTC
Created attachment 1279961 [details]
No mismatch in next system update

[root@dhcp71-112 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.23-1
subscription management rules: 5.15.1
subscription-manager: 1.19.14-1.el7
python-rhsm: 1.19.6-1.el7

Comment 9 Shwetha Kallesh 2017-05-18 11:39:43 UTC
marking bug as verified as I dont see any mismatch between rhsmcertd log and next system check values in the about window of gui

Comment 10 errata-xmlrpc 2017-08-01 19:23:41 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-2017:2083


Note You need to log in before you can comment on or make changes to this bug.