Bug 142605 - init script doesn't use /var/lock/subsys
Summary: init script doesn't use /var/lock/subsys
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mailman
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John Dennis
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-10 20:55 UTC by Rex Dieter
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-15 16:01:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
use /var/lock/subsys/mailman (741 bytes, patch)
2004-12-10 20:56 UTC, Rex Dieter
no flags Details | Diff
use /var/lock/subsys/mailman (741 bytes, patch)
2004-12-10 21:04 UTC, Rex Dieter
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:235 0 high SHIPPED_LIVE Important: mailman security update 2005-03-21 05:00:00 UTC

Description Rex Dieter 2004-12-10 20:55:19 UTC
As of at least mailman-2.1.5-26 in rawhide, it's init script doesn't 
create/use/delete anything in /var/lock/subsys.  Bad.  Why?

On my box, I jump between runlevel 3 and 5 occasionally.  Without the 
subsys lock, init doesn't know mailman is already running, so a new 
instance gets launched everytime the runlevel is changed.

I'll attach a patch implementing use of /var/lock/subsys/mailman 
(which also helps to simplify the condrestart case)

Comment 1 Rex Dieter 2004-12-10 20:56:13 UTC
Created attachment 108353 [details]
use /var/lock/subsys/mailman

Comment 2 Rex Dieter 2004-12-10 21:04:28 UTC
Created attachment 108356 [details]
use /var/lock/subsys/mailman

updated version that actually works.  Previous patch broke condrestart and had
a missing 'fi' leading to syntax error

Comment 3 John Dennis 2004-12-10 21:13:32 UTC
Mailman has its own locking scheme. How this approach successfully
deal with abnormal termination?

Isn't the real bug restarting mailman when changing run levels?

If the bug is that the existing locking scheme is failing lets fix
that rather than introduce two incompatible schemes that don't play
together.

Comment 4 Rex Dieter 2004-12-10 21:19:56 UTC
Yes, the real bug is mailman restarting when changing run levels.  I 
don't care how/where /var/subsys/lock/mailman gets created 
(in /etc/rc.d/init.d/mailman or in mailmanctl), just as long as it 
does.

Comment 5 John Dennis 2004-12-10 21:25:42 UTC
Why is it critical that /var/subsys/lock/mailman be created by any
agent? Isn't the requirement that duplicate copies of mailman are not
created when changing run levels?

Comment 6 Rex Dieter 2004-12-10 21:38:15 UTC
I thought it was /var/subsys/lock/$prog that init uses to determine 
if a service is running or not.

Comment 7 John Dennis 2004-12-10 21:49:37 UTC
I just went off and had a hallway conversation and you are indeed
correct /var/subsys/lock/<prog> is used by init. I mistakenly thought
init called the init script. This is what I think I'll do:

1) Add the /var/subsys/lock file, but it will only be there for init's
use.

2) Retain the existing mailman process control which does not depend
on lock files. The results of querying mailmanctl on its status will
determine if the lock file should be created or removed.

How does that sound?

Comment 8 Rex Dieter 2004-12-10 21:51:53 UTC
fabulous.

Comment 10 Mark J. Cox 2005-03-21 18:31:20 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 the 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-2005-235.html



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