Bug 521926

Summary: squid 'stop after stop' is not LSB compliant
Product: Red Hat Enterprise Linux 5 Reporter: Lon Hohberger <lhh>
Component: squidAssignee: Jiri Skala <jskala>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: low Docs Contact:
Priority: low    
Version: 5.4CC: aglotov, ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:18:34 UTC Type: ---
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
Naive proposed fix none

Description Lon Hohberger 2009-09-08 18:33:55 UTC
Description of problem:

The LSB states that stop-after-stop should be considered successful.

http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

[quote]
For all other init-script actions, the init script shall return an exit status of zero if the action was successful. Otherwise, the exit status shall be non-zero, as defined below. In addition to straightforward success, the following situations are also to be considered successful:
...
 * running stop on a service already stopped or not running
...
[/quote]

Version-Release number of selected component (if applicable): squid-2.6.STABLE6-4.el5, squid-2.6.STABLE21-3.el5

How reproducible: 100%

Steps to Reproduce:
1.  service squid stop
2.  service squid stop
3.  echo $?
  
Actual results: 1
Expected results: 0

Additional info:

This effectively renders the 'squid' init script unsuitable for use in clustered environments, as we rely on the return codes being LSB compliant.

Attached is a proposed patch; I do not know if it is sufficient or not.

Comment 1 Lon Hohberger 2009-09-08 18:34:26 UTC
Created attachment 360116 [details]
Naive proposed fix

Comment 2 Jiri Skala 2009-11-18 14:34:37 UTC
This is fixed and tested in Fedora checking for lock file. I propose back-porting.

Jiri

Comment 3 Lon Hohberger 2009-11-18 18:30:35 UTC
Backporting from an existing, working solution is preferable.

Comment 9 errata-xmlrpc 2010-03-30 08:18:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0221.html