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 1431659 - systemctl stop rhsmcertd leaves /var/run/rhsm/cert.pid behind
Summary: systemctl stop rhsmcertd leaves /var/run/rhsm/cert.pid behind
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: rc
: 7.4
Assignee: Kevin Howell
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-13 14:31 UTC by Barnaby Court
Modified: 2017-08-01 19:21 UTC (History)
3 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1561 0 'None' closed 1431659: Let rhsmcertd-worker clean up on SIGTERM 2020-04-08 17:58:32 UTC
Red Hat Bugzilla 1428435 1 None None None 2021-01-20 06:05:38 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

Internal Links: 1428435

Description Barnaby Court 2017-03-13 14:31:16 UTC
Description of problem:

systemctl stop rhsmcertd leaves /var/run/rhsm/cert.pid behind. The pid file should be cleaned up when the process is stopped. This does not cause problems for restarting the process but it does look strange. 

+ ls -l /var/run/rhsm/cert.pid
-rw-r--r-- 1 root root 5 Mar 10 16:46 /var/run/rhsm/cert.pid
+ cat /var/run/rhsm/cert.pid
11493
+ systemctl stop rhsmcertd
+ sleep 5
+ ls -l /var/run/rhsm/cert.pid
-rw-r--r-- 1 root root 5 Mar 10 16:46 /var/run/rhsm/cert.pid
+ cat /var/run/rhsm/cert.pid
11493

Stopping that really ought to clean up the .pid file.

Comment 2 Shwetha Kallesh 2017-04-13 15:06:07 UTC
Reproducer:

[root@bkr-hv03-guest33 home]# systemctl start rhsmcertd

[root@bkr-hv03-guest33 home]# ls -l /var/run/rhsm/cert.pid
-rw-r--r--. 1 root root 5 Apr 13 10:33 /var/run/rhsm/cert.pid

[root@bkr-hv03-guest33 home]# systemctl stop rhsmcertd
[root@bkr-hv03-guest33 home]# ls -l /var/run/rhsm/cert.pid
-rw-r--r--. 1 root root 5 Apr 13 10:33 /var/run/rhsm/cert.pid


Verification:

Kevin,

Dont see any /var/run/rhsm/cert.pid file being created when you start rhsmcertd service, was that intentional?

[root@bkr-hv03-guest33 ~]# systemctl start rhsmcertd
[root@bkr-hv03-guest33 ~]# sleep 120
[root@bkr-hv03-guest33 ~]# ls -l /var/run/rhsm/cert.pid
ls: cannot access /var/run/rhsm/cert.pid: No such file or directory

Comment 3 Shwetha Kallesh 2017-04-13 15:06:39 UTC
Forgot add the version of RHSM 

[root@bkr-hv03-guest33 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.21-1
subscription management rules: 5.15.1
subscription-manager: 1.19.7-1.el7
python-rhsm: 1.19.4-1.el7

Comment 4 Kevin Howell 2017-04-13 20:04:23 UTC
Shwetha, the cert.pid file may be short lived as it is only acquired for a short time during a check-in/autoheal.

Comment 5 Shwetha Kallesh 2017-04-17 07:22:12 UTC
Verified!!

[root@dhcp35-160 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.1.0-1
subscription management rules: 5.23
subscription-manager: 1.19.7-1.el7
python-rhsm: 1.19.4-1.el7


[root@dhcp35-160 ~]# service rhsmcertd restart
Redirecting to /bin/systemctl restart  rhsmcertd.service
[root@dhcp35-160 ~]# sleep 120
[root@dhcp35-160 ~]# ls -l /var/run/rhsm/cert.pid
ls: cannot access /var/run/rhsm/cert.pid: No such file or directory
[root@dhcp35-160 ~]# service rhsmcertd stop
Redirecting to /bin/systemctl stop  rhsmcertd.service
[root@dhcp35-160 ~]# ls -l /var/run/rhsm/cert.pid
ls: cannot access /var/run/rhsm/cert.pid: No such file or directory
[root@dhcp35-160 ~]#

Comment 6 errata-xmlrpc 2017-08-01 19:21:47 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.