openbaton / python-vnfm-dummy

A dummy Vnfm written in python to be used as example
Apache License 2.0
1 stars 2 forks source link

VNFM fails with a ChannelClosed exception #1

Open mcilloni opened 7 years ago

mcilloni commented 7 years ago

I've been trying to run the Python Dummy VNFM with no success. Following the README, I've configured it and then I've executed python2 __main__.py in a virtualenv, getting a ChannelClosed exception (one for each thread) almost immediately :

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/home/marco/Workspace/python-vnfm-dummy-py2/venv/lib/python2.7/site-packages/vnfm/sdk/AbstractVnfmABC.py", line 296, in run
    channel.queue_declare(queue='vnfm.nfvo.actions', auto_delete=self.queuedel, durable=True)
  File "/home/marco/Workspace/python-vnfm-dummy-py2/venv/lib/python2.7/site-packages/pika/adapters/blocking_connection.py", line 2329, in queue_declare
    self._flush_output(declare_ok_result.is_ready)
  File "/home/marco/Workspace/python-vnfm-dummy-py2/venv/lib/python2.7/site-packages/pika/adapters/blocking_connection.py", line 1181, in _flush_output
    raise exceptions.ChannelClosed(method.reply_code, method.reply_text)
ChannelClosed: (406, "PRECONDITION_FAILED - parameters for queue 'vnfm.nfvo.actions' in vhost '/' not equivalent")

The OpenBaton/RabbitMQ instances I've been trying to use the Dummy VNFM with are those shipped by the openbaton/standalone:latest Docker container.

Is this a bug, or is there something broken with my setup?

lorenzotomasini commented 7 years ago

Hi @mcilloni ,

The python sdk is still under development, but the error you are pointing is not a big issue. You should set the queue durability of the NFVO to true by changing in the /etc/openbaton/openbaton.properties:

nfvo.rabbitmq.durable = false

to

nfvo.rabbitmq.durable = true

We will soon allow that configuration in the python sdk as well, sorry for the incovenience Lorenzo