Bug 1230753

Summary: insufficient check for running service in condrestart and try-restart actions
Product: Red Hat Enterprise Linux 6 Reporter: Ondřej Pták <optak>
Component: squidAssignee: Luboš Uhliarik <luhliari>
Status: CLOSED ERRATA QA Contact: Martin Frodl <mfrodl>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.7CC: mfrodl
Target Milestone: betaKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: squid-3.1.23-14.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1301005 (view as bug list) Environment:
Last Closed: 2016-05-11 00:20:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch which fixes this issue none

Description Ondřej Pták 2015-06-11 13:30:56 UTC
Description of problem:
Init actions condrestart and try-restart should restart squid service only when already running, but in current implementation there is only check for existence of lockfile, which is not sufficient. It's possible that squid is not running, but lockfile exists and in this case, squid is started even if it was not running before condrestart/try-restart action:


Version-Release number of selected component (if applicable):
squid-3.1.23-9.el6

How reproducible:
always

Steps to Reproduce:
1. service squid stop
2. touch /var/lock/subsys/squid
3. service squid condrestart
4. service squid status

Actual results:
# service squid stop
Stopping squid: ................                           [  OK  ]
# touch /var/lock/subsys/squid
# service squid condrestart
Stopping squid:                                            [FAILED]
Starting squid: .                                          [  OK  ]
# service squid status
squid (pid  26604) is running...

Expected results:                                          [  OK  ]
# service squid status
squid dead but subsys locked

Additional info:

Comment 1 Luboš Uhliarik 2015-08-13 11:53:15 UTC
Created Patch solving this issue

Comment 2 Luboš Uhliarik 2015-08-13 11:55:18 UTC
Created attachment 1062508 [details]
Patch which fixes this issue

Comment 12 errata-xmlrpc 2016-05-11 00:20: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://rhn.redhat.com/errata/RHBA-2016-0896.html