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):
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'
As step 4.
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.
Created attachment 1273862 [details]
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.
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.
(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.
Will verify this bug when next RHEL7.4 build comes out.
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
marking bug as verified as I dont see any mismatch between rhsmcertd log and next system check values in the about window of gui
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.