This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 481770 - Sesame's init script allows for starting multiple sesame daemons
Sesame's init script allows for starting multiple sesame daemons
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-qmf (Show other bugs)
1.1
All Linux
low Severity high
: 1.3.2-RC2
: ---
Assigned To: Matthew Farrellee
Frantisek Reznicek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-27 10:03 EST by Matthew Farrellee
Modified: 2015-11-15 19:06 EST (History)
10 users (show)

See Also:
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
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-15 07:16:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Matthew Farrellee 2009-01-27 10:03:18 EST
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 13:06:43 EST
I think the sesame daemon itself should enforce singletonness.  Do you agree, Ted?
Comment 3 Frantisek Reznicek 2010-04-23 05:16:24 EDT
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 10:11:59 EDT
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 15:28:33 EST
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 08:18:02 EST
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 08:20:42 EST
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 14:22:07 EST
    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 15:00:44 EST
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 04:12:53 EST
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 10:27:42 EST
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 11:29:45 EST
This is not a Cumin bug, I am setting it into management component.
Comment 15 errata-xmlrpc 2011-02-15 07:16:18 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 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.