Missing argument to raise_invalid_topology_version() in impl_qpid.py

Bug #1251762 reported by Ken Giusti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
High
Ken Giusti

Bug Description

The fix for bug/1178375

https://bugs.launchpad.net/oslo/+bug/1178375

introduces a method raise_invalid_topology_version(), which is invoked when an invalid topology version is configured.

This method is improperly called by the code - it is missing an argument. Example:

(py27)[kgiusti@t530 work (master)]$ ./my-server.py --topology=42 server01
Running server, name=server01 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 42
Traceback (most recent call last):
  File "./my-server.py", line 125, in <module>
    sys.exit(main())
  File "./my-server.py", line 113, in main
    server.start()
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/server.py", line 126, in start
    listener = self.transport._listen(self.target)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/transport.py", line 101, in _listen
    return self._driver.listen(target)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 399, in listen
    conn.declare_topic_consumer(target.topic, listener)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 663, in declare_topic_consumer
    topic, callback)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 594, in declare_consumer
    return self.ensure(_connect_error, _declare_consumer)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 552, in ensure
    return method(*args, **kwargs)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 590, in _declare_consumer
    consumer = consumer_cls(self.conf, self.session, topic, callback)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 260, in __init__
    raise_invalid_topology_version()
TypeError: raise_invalid_topology_version() takes exactly 1 argument (0 given)

The expected action would be:

(py27)[kgiusti@t530 work (master)]$ ./my-server.py --topology=42 server01
Running server, name=server01 exchange=my-exchange topic=my-topic namespace=my-namespace
Using QPID topology version 42
No handlers could be found for logger "oslo.messaging._drivers.impl_qpid"
Traceback (most recent call last):
  File "./my-server.py", line 125, in <module>
    sys.exit(main())
  File "./my-server.py", line 113, in main
    server.start()
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/server.py", line 126, in start
    listener = self.transport._listen(self.target)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/transport.py", line 101, in _listen
    return self._driver.listen(target)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 399, in listen
    conn.declare_topic_consumer(target.topic, listener)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 663, in declare_topic_consumer
    topic, callback)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 594, in declare_consumer
    return self.ensure(_connect_error, _declare_consumer)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 552, in ensure
    return method(*args, **kwargs)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 590, in _declare_consumer
    consumer = consumer_cls(self.conf, self.session, topic, callback)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 260, in __init__
    raise_invalid_topology_version(conf)
  File "/home/kgiusti/work/openstack/oslo/oslo.messaging/.tox/py27/lib/python2.7/site-packages/oslo/messaging/_drivers/impl_qpid.py", line 93, in raise_invalid_topology_version
    raise Exception(msg)
Exception: Invalid value for qpid_topology_version: 42

Revision history for this message
Ken Giusti (kgiusti) wrote :
Revision history for this message
Mark McLoughlin (markmc) wrote :
Changed in oslo.messaging:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → Ken Giusti (kgiusti)
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in oslo.messaging:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo.messaging:
milestone: icehouse-1 → 1.3.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.