Bug 1087938 - Only one of three handlers is launched
Summary: Only one of three handlers is launched
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: openlmi-tools
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Hatina
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-15 16:07 UTC by Alois Mahdal
Modified: 2014-04-15 20:35 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-15 20:35:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
subscribe.py - add 3 indication subscriptions (745 bytes, text/x-python)
2014-04-15 16:09 UTC, Alois Mahdal
no flags Details
listen.py - create listener with 3 handlers (971 bytes, text/x-python)
2014-04-15 16:10 UTC, Alois Mahdal
no flags Details
trigger.sh - trigger indication by adding/removing user (805 bytes, application/x-shellscript)
2014-04-15 16:11 UTC, Alois Mahdal
no flags Details
"out" folder from my tests (5.94 KB, application/gzip)
2014-04-15 16:22 UTC, Alois Mahdal
no flags Details

Description Alois Mahdal 2014-04-15 16:07:39 UTC
Description of problem
----------------------

I have subscribed three indications for LMI_AccountInstanceDeletionIndication, and started a listener with three different handlers (same function, different names and different arg passed).

Then I created and deleted user which made Pegasus send 3 POST messages, but only one handler was launched.


Version-Release number of selected component (if applicable)
------------------------------------------------------------

openlmi-tools-0.9-16.fc20.noarch


How reproducible
----------------

Always


Steps to Reproduce
------------------

 1. Install OpenLMI and start CIM server
 2. Download attached 3 scripts and edit them to set ports/hosts accordingly
 3. Run subscribe.py
 4. Run listen.py
 5. On a different console, run trigger.sh and watch the other console


Actual results
--------------

listen.py only reports one of handlers being launched


Expected results
----------------

Since

 *  there are three subscriptions,
 *  each mapping by name to a handler ('mh1', 'mh2', 'mh3'),
 *  and three different indications are really sent
    ('POST /mh1...', as you can see in PCAP/Ncat dumps inside
    "out" sub-folder),

all handlers should be executed.


Additional info
---------------

It seems random which one of handlers is launched.

Comment 1 Alois Mahdal 2014-04-15 16:09:06 UTC
Created attachment 886546 [details]
subscribe.py - add 3 indication subscriptions

Comment 2 Alois Mahdal 2014-04-15 16:10:16 UTC
Created attachment 886547 [details]
listen.py - create listener with 3 handlers

Comment 3 Alois Mahdal 2014-04-15 16:11:28 UTC
Created attachment 886548 [details]
trigger.sh - trigger indication by adding/removing user

Comment 4 Alois Mahdal 2014-04-15 16:22:58 UTC
Created attachment 886549 [details]
"out" folder from my tests

I performed three test to create the tarball.

First two tests reproduced this bug and listene.py generated these messages:

    [20140415-113913] handler started: mh1
    [20140415-113913] handler finished: mh1
    [20140415-113923] handler started: mh2
    [20140415-113923] handler finished: mh2

You can ignore third one, it's other bug (invalid XML from CIMOM, exception from Expat).

Comment 5 Alois Mahdal 2014-04-15 20:35:20 UTC
Turns out it's problem in my Ncat proxy (read: between the keyboard and the chair).

At least with my setting, NC does not re-open new outgoing connection for each incoming connection, so the indications get messed up together.  This also explains the problem with invalid XML I mentioned earlier today.

Removing NC from the script, both these problems disappeared.


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