Bug 142605 - init script doesn't use /var/lock/subsys
init script doesn't use /var/lock/subsys
Product: Fedora
Classification: Fedora
Component: mailman (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
Depends On:
  Show dependency treegraph
Reported: 2004-12-10 15:55 EST by Rex Dieter
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-15 11:01:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Rex Dieter 2004-12-10 15:55:19 EST
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 15:56:13 EST
Created attachment 108353 [details]
use /var/lock/subsys/mailman
Comment 2 Rex Dieter 2004-12-10 16:04:28 EST
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 16:13:32 EST
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
Comment 4 Rex Dieter 2004-12-10 16:19:56 EST
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 
Comment 5 John Dennis 2004-12-10 16:25:42 EST
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 16:38:15 EST
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 16:49:37 EST
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

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 16:51:53 EST
Comment 10 Mark J. Cox 2005-03-21 13:31:20 EST
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.


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