Hi guys,

Sorry to bug, but I have met a problem about the rpc call. I wrote some python 
code to rpc.call to nova-condcutor, but that rpc.call seems never return. (I'm 
using rabbitmq as the rpc backend) My code snippet is something like:

  conductor_api = conductor.API()
  ctxt = context.get_admin_context()
  services = conductor_api.service_get_all(ctxt)
  
It blocks at conductor_api.service_get_all. I did some debug, and found that 
the main thread blocked at the line 
https://github.com/openstack/nova/blob/master/nova/openstack/common/rpc/amqp.py#L486
 waiting to get the reply messages of the previous rpc.call to nova-conductor 
out of the data queue self._dataqueue (it's of type eventlet.queue.LightQueue). 
Also I've confirmed that nova-conductor has received the rpc.call and served 
it. And those reply messages from nova-conductor actually had been added into 
that data queue by the line 
https://github.com/openstack/nova/blob/master/nova/openstack/common/rpc/amqp.py#L193
 . However, the main thread seemed never be able to wake up again.

Here is a simplified version of my code which can reproduce the same problem:
1. Have a nova-conductor service running
  # nova-conductor --config-file <nova config file>
2. Get my simple python code
  # wget https://raw.github.com/lianhao/novadbtest/master/t.py 
3. Run the python code
  # python t.py --config-file <same nova config file as the nova-conductor>

Can anyone give me some clue where I'm doing it wrong? Thanks a lot!

Best Regards,
-Lianhao


_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to