Bug 142605

Summary: init script doesn't use /var/lock/subsys
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: mailmanAssignee: John Dennis <jdennis>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-15 16:01:04 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
use /var/lock/subsys/mailman
none
use /var/lock/subsys/mailman none

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