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:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1561 'None' closed 1431659: Let rhsmcertd-worker clean up on SIGTERM 2020-04-08 17:58:32 UTC
Red Hat Bugzilla 1428435 None None None 2019-12-03 09:24:16 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

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.