Bug 1087938
| Summary: | Only one of three handlers is launched | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Alois Mahdal <amahdal> |
| Component: | openlmi-tools | Assignee: | Peter Hatina <phatina> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 20 | CC: | agk, miminar, phatina, tsmetana |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-04-15 20:35:20 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Attachments: | |||
Created attachment 886546 [details]
subscribe.py - add 3 indication subscriptions
Created attachment 886547 [details]
listen.py - create listener with 3 handlers
Created attachment 886548 [details]
trigger.sh - trigger indication by adding/removing user
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).
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. |
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.