Bug 521926 - squid 'stop after stop' is not LSB compliant
Summary: squid 'stop after stop' is not LSB compliant
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: squid
Version: 5.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jiri Skala
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-08 18:33 UTC by Lon Hohberger
Modified: 2014-11-09 22:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:18:34 UTC


Attachments (Terms of Use)
Naive proposed fix (276 bytes, patch)
2009-09-08 18:34 UTC, Lon Hohberger
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0221 normal SHIPPED_LIVE Low: squid security and bug fix update 2010-03-29 12:32:22 UTC

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


Note You need to log in before you can comment on or make changes to this bug.