Comment 31 for bug 1257293

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

Hello, I'm new to qpid and oslo.messaging, trying to get more insight into those modules and verifying the bug as fixed. It seems that incorrect behaviour seen in https://bugs.launchpad.net/oslo/+bug/1178375/comments/26 is still present in the latest oslo.messaging.

Here is what I did to verify the fix:

1. Installed Fedora 20 with latest updates.
2. installed qpid-cpp-server, started service.
3. get oslo.messaging: https://github.com/openstack/oslo.messaging.git
4. installed oslo.messaging and requirements with pip, installed qpid-python.
5. get oslo server and client for testing: https://github.com/kgiusti/oslo-messaging-clients.git
6. ran two testing servers with topology=1, sent rpc request to them -> got single server action triggered (correct).
7. ran two testing servers with topology=2, sent rpc request to them -> got both server actions triggered (wrong).

In case of topology=1, it looks as follows:

[root@localhost oslo-messaging-clients]# ./my-server.py --topology=1 server01 &
[1] 2634
[root@localhost oslo-messaging-clients]# Running server, name=server01 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 1

[root@localhost oslo-messaging-clients]# ./my-server.py --topology=1 server02 &
[2] 2656
[root@localhost oslo-messaging-clients]# Running server, name=server02 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 1

[root@localhost oslo-messaging-clients]# ./my-client.py --topology=1 my-topic methodB arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
Method=methodB, args={'arg1': 'arg2'}
Using QPID topology version 1
server01::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:04 2013'} arg={u'arg1': u'arg2'} ) called!!!
Return value={u'application': u'my-client', u'time': u'Mon Dec 23 14:10:04 2013', u'cast': None}
[root@localhost oslo-messaging-clients]# ./my-client.py --topology=1 my-topic methodB arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
Method=methodB, args={'arg1': 'arg2'}
Using QPID topology version 1
server02::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:07 2013'} arg={u'arg1': u'arg2'} ) called!!!
Return value={u'application': u'my-client', u'time': u'Mon Dec 23 14:10:07 2013', u'cast': None}
[root@localhost oslo-messaging-clients]#
[root@localhost oslo-messaging-clients]# ./my-client.py --topology=1 my-topic methodB arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
Method=methodB, args={'arg1': 'arg2'}
Using QPID topology version 1
server01::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:09 2013'} arg={u'arg1': u'arg2'} ) called!!!
Return value={u'application': u'my-client', u'time': u'Mon Dec 23 14:10:09 2013', u'cast': None}
[root@localhost oslo-messaging-clients]#
[root@localhost oslo-messaging-clients]# ./my-client.py --topology=1 my-topic methodB arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
Method=methodB, args={'arg1': 'arg2'}
Using QPID topology version 1
server02::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:11 2013'} arg={u'arg1': u'arg2'} ) called!!!
Return value={u'application': u'my-client', u'time': u'Mon Dec 23 14:10:11 2013', u'cast': None}
[root@localhost oslo-messaging-clients]#

In case of topology=2, we see duplicate handlers triggered:

[root@localhost oslo-messaging-clients]# ./my-server.py --topology=2 server02 &
[1] 2686
[root@localhost oslo-messaging-clients]# Running server, name=server02 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 2

[root@localhost oslo-messaging-clients]# ./my-server.py --topology=2 server01 &
[2] 2692
[root@localhost oslo-messaging-clients]# Running server, name=server01 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 2

[root@localhost oslo-messaging-clients]# ./my-client.py --topology=2 my-topic methodB arg1 arg2
Calling server on topic my-topic, server=None exchange=my-exchange namespace=my-namespace fanout=None
Method=methodB, args={'arg1': 'arg2'}
Using QPID topology version 2
server01::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:54 2013'} arg={u'arg1': u'arg2'} ) called!!!
server02::TestEndpoint02::methodB( ctxt={'application': u'my-client', 'cast': None, 'time': u'Mon Dec 23 14:10:54 2013'} arg={u'arg1': u'arg2'} ) called!!!
Return value={u'application': u'my-client', u'time': u'Mon Dec 23 14:10:54 2013', u'cast': None}
[root@localhost oslo-messaging-clients]#

That said, is there a chance that the fix left the original bug intact? Or am I missing smth?