openbaton / openbaton-libs

Libraries and sdks shared among projects
Apache License 2.0
3 stars 11 forks source link

Plugin crashes during AMQP RPC calls are not handled properly #10

Closed mcilloni closed 7 years ago

mcilloni commented 7 years ago

While handling an incoming delivery from the NFVO, a plugin may crash or lose connectivity with RabbitMQ without being able to acknowledge the received RPC request.

If this happens, the thread running the instance of org.openbaton.plugin.utils.PluginCaller will stall forever while waiting for ACKs on a temporary queue nobody will ever publish to anymore, there is no timeout to break the lock.

An example of this can be seen in org.openbaton.nfvo.core.api.VimManagement.refresh(): if the VimDriver crashed during listImages, the queryNetworks() method of Vim will never return because it will be stuck in a call to the nextDelivery() of its AMQP consumer.

lorenzotomasini commented 7 years ago

what do you think about this?

lorenzotomasini commented 7 years ago

as soon as i fix the tests

mcilloni commented 7 years ago

I haven't tested it, but it looks fine to me.