RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1440934 - rhsmcertd is not starting the Auto-attach interval
Summary: rhsmcertd is not starting the Auto-attach interval
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
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Chris Snyder
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-10 19:00 UTC by John Sefler
Modified: 2017-08-01 19:22 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.19.7-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:22:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1580 0 'None' closed 1440934: Ensure rhsmcertd performs both types of checks 2021-02-01 17:38:49 UTC
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description John Sefler 2017-04-10 19:00:58 UTC
Description of problem:
I believe this pull request introduced a regression in the rhsmcertd process...
  https://github.com/candlepin/subscription-manager/pull/1577

When restarting the rhsmcertd process, there are two intervals started... autoAttachInterval=1440 and certCheckInterval=240.  Unfortunately only the certCheckInterval appears to be started (twice).

In addition to fixing this, also consider Problem 2 described in the Actual Results below.

Version-Release number of selected component (if applicable):
[root@jsefler-rhel7 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.19.5-1.git.14.4f78930.el7.x86_64
python-rhsm-1.19.3-1.git.4.4f78930.el7.x86_64


How reproducible:


Steps to Reproduce:
While successfully registered to an entitlement server...
[root@jsefler-rhel7 ~]# subscription-manager config | grep rhsmcertd -A3
[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]
   maxsplayminutes = 10

[root@jsefler-rhel7 ~]# systemctl restart rhsmcertd.service

[root@jsefler-rhel7 ~]# tail -f /var/log/rhsm/rhsmcertd.log
Mon Apr 10 14:44:41 2017 [INFO] rhsmcertd is shutting down...
Mon Apr 10 14:44:41 2017 [INFO] Starting rhsmcertd...
Mon Apr 10 14:44:41 2017 [INFO] Auto-attach interval: 1440.0 minute(s) [86400 second(s)]
Mon Apr 10 14:44:41 2017 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Mon Apr 10 14:44:41 2017 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Mon Apr 10 14:46:42 2017 [INFO] (Cert Check) Certificates updated.
Mon Apr 10 14:46:42 2017 [INFO] (Cert Check) Certificates updated.


Actual results:
Problem 1:
Mon Apr 10 14:46:42 2017 [INFO] (Cert Check) Certificates updated. <---- EXPECTED "(Auto-attach) Certificates updated."
Mon Apr 10 14:46:42 2017 [INFO] (Cert Check) Certificates updated.

Problem 2:
If new RFE Bug 1435013 is working, then the timestamp on the (Cert Check) should have been something more than 2 minutes up to a max of 10 minutes as set by the new maxsplayminutes.  To be more explicit in the rhsmcertd log, can you add another INFO LOG after the [INFO] Waiting 120 second(s) that says something like this...
Mon Apr 10 14:46:41 2017 [INFO] Delaying an additional random N second(s) before running updates.

Expected results:
It appears that (Cert Check) is called twice instead of (Auto-attach) and (Cert Check)

Additional info:

Comment 2 Chris Snyder 2017-04-10 19:41:17 UTC
Adding an external tracker to a PR that should fix this.

Waiting on review.

Comment 4 Shwetha Kallesh 2017-04-13 09:46:54 UTC
verified

[root@bkr-hv03-guest33 ~]# subscription-manager register --force
The system with UUID 700665b9-fab6-44ad-b791-4d1e7cf233c7 has been unregistered
Registering to: subscription.rhn.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: 1236f369-d434-40e5-ad90-34dfd249ab80 
[root@bkr-hv03-guest33 ~]# subscription-manager config | grep rhsmcertd -A3
[rhsmcertd]
   autoattachinterval = [1440]
   certcheckinterval = [240]

[root@bkr-hv03-guest33 ~]# systemctl restart rhsmcertd.service
[root@bkr-hv03-guest33 ~]# tail -f /var/log/rhsm/rhsmcertd.log 
Wed Apr 12 00:09:55 2017 [INFO] Auto-attach interval: 1440.0 minute(s) [86400 second(s)]
Wed Apr 12 00:09:55 2017 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Wed Apr 12 00:09:55 2017 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.
Wed Apr 12 00:11:56 2017 [WARN] (Auto-attach) Update failed (255), retry will occur on next run.
Wed Apr 12 00:11:56 2017 [WARN] (Cert Check) Update failed (255), retry will occur on next run.
Wed Apr 12 03:04:21 2017 [INFO] rhsmcertd is shutting down...
Thu Apr 13 05:43:27 2017 [INFO] Starting rhsmcertd...
Thu Apr 13 05:43:27 2017 [INFO] Auto-attach interval: 1440.0 minute(s) [86400 second(s)]
Thu Apr 13 05:43:27 2017 [INFO] Cert check interval: 240.0 minute(s) [14400 second(s)]
Thu Apr 13 05:43:27 2017 [INFO] Waiting 120 second(s) [2.0 minute(s)] before running updates.

Thu Apr 13 05:45:38 2017 [INFO] (Auto-attach) Certificates updated.
Thu Apr 13 05:45:43 2017 [INFO] (Cert Check) Certificates updated.


^C
[root@bkr-hv03-guest33 ~]# subscription-manager list --installed

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.4 Beta
Arch:           x86_64
Status:         Subscribed
Status Details: 
Starts:         04/10/2017
Ends:           04/25/2017

Comment 5 errata-xmlrpc 2017-08-01 19:22:43 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.