Bug 481770 - Sesame's init script allows for starting multiple sesame daemons
Summary: Sesame's init script allows for starting multiple sesame daemons
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf
Version: 1.1
Hardware: All
OS: Linux
low
high
Target Milestone: 1.3.2-RC2
: ---
Assignee: Matthew Farrellee
QA Contact: Frantisek Reznicek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-27 15:03 UTC by Matthew Farrellee
Modified: 2018-10-27 14:57 UTC (History)
10 users (show)

Fixed In Version: sesame-0.7.4297-5.el5
Doc Type: Bug Fix
Doc Text:
C: cumin init script would not detect service already running on start C: Multiple cumin instances could be started at once F: The init script now uses a subsys lock to avoid multiple runs R: service cumin start is now idempotent
Clone Of:
Environment:
Last Closed: 2011-02-15 12:16:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0217 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging and Grid bug fix and enhancement update 2011-02-15 12:10:15 UTC

Description Matthew Farrellee 2009-01-27 15:03:18 UTC
Version-Release number of selected component (if applicable):

sesame-0.4.3030-2.el5


How reproducible:

100%


Steps to Reproduce:
1. service sesame start
2. service sesame start
3. service sesame status
  
Actual results:

2 sesame daemons will be running


Expected results:

1 sesame daemon running, from step 1, and just a return of code 0 for step 2.


Additional info:

This is a problem because it results in a single machine being over represented in the qmf data stream, and confuses qmf ids with collisions.

Comment 1 Justin Ross 2009-02-02 18:06:43 UTC
I think the sesame daemon itself should enforce singletonness.  Do you agree, Ted?

Comment 3 Frantisek Reznicek 2010-04-23 09:16:24 UTC
Quick crosscheck on beta1
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# rpm -q sesame
sesame-0.7.3918-1.el5
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# service sesame status
sesame is stopped
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# service sesame start
Starting Sesame daemon:                                    [  OK  ]
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# service sesame status
sesame (pid 4953) is running...
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# service sesame start
Starting Sesame daemon:                                    [  OK  ]
[root@mrg-qe-02 qpid_ptest_authentication_krb5]# service sesame status
sesame (pid 5007 4953) is running...

The issue is still present on sesame-0.7.3918-1.el5

Comment 5 Jan Sarenik 2010-08-11 14:11:59 UTC
It is still possible to run unlimited number of sesames from one host.
sesame-0.7.3918-6.el5

Comment 6 Matthew Farrellee 2010-12-07 20:28:33 UTC
Here is a simple patch to enforce the singleton nature from the init script. It should be sufficient to satisfy requirements with a small impact on sesame. As an side, it is valuable to be able to run many sesame daemons on a single machine.

Index: cpp/etc/sysvinit-sesame
===================================================================
--- cpp/etc/sysvinit-sesame	(revision 4429)
+++ cpp/etc/sysvinit-sesame	(working copy)
@@ -22,6 +22,10 @@
 RETVAL=0
 
 start() {
+    # Run only a single daemon
+    status $processname > /dev/null && exit 0
+    rm -f /var/lock/subsys/$servicename
+
     echo -n $"Starting Sesame daemon: "
     daemon --user sesame --check $servicename $processname $SESAME_OPTIONS\&
     RETVAL=$?

Comment 7 Frantisek Reznicek 2011-01-11 13:18:02 UTC
The issue is not yet included in last packaged sesame version (sesame-0.7.4297-4.el5). See details below:

[root@mrg-qe-02 ~]# service sesame status
sesame (pid 4046) is running...
[root@mrg-qe-02 ~]# service sesame start
Starting Sesame daemon:                                    [  OK  ]
[root@mrg-qe-02 ~]# service sesame status
sesame (pid 26925 4046) is running...
[root@mrg-qe-02 ~]# rpm -q sesame
sesame-0.7.4297-4.el5.x86_64
[root@mrg-qe-02 ~]#

Comment 8 Frantisek Reznicek 2011-01-11 13:20:42 UTC
Waiting for the package with fix.

(s/The issue is not yet included/The issue patch is not yet included/ in comment 7)

Comment 9 Matthew Farrellee 2011-01-18 19:22:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: cumin init script would not detect service already running on start
C: Multiple cumin instances could be started at once
F: The init script now uses a subsys lock to avoid multiple runs
R: service cumin start is now idempotent

Comment 10 Nuno Santos 2011-01-18 20:00:44 UTC
Built sesame-0.7.4297-5.el5 to include the above patch. See
https://brewweb.devel.redhat.com/buildinfo?buildID=154503

Comment 11 Frantisek Reznicek 2011-01-20 09:12:53 UTC
sesame-0.7.4297-5.el5 fixes the problem reliably.
Waiting for el4 package to be able to close this defect.

Comment 13 Frantisek Reznicek 2011-01-20 15:27:42 UTC
The issue has been fixed, tested on RHEL 4.8 / 5.6 i386 / x86_64 on package
sesame-0.7.4297-5.el4/5

-> VERIFIED

Comment 14 Jan Sarenik 2011-01-28 16:29:45 UTC
This is not a Cumin bug, I am setting it into management component.

Comment 15 errata-xmlrpc 2011-02-15 12:16:18 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/RHBA-2011-0217.html


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