VMware: VimException __str__ attempts to concatenate string to list

Bug #1287884 reported by Shawn Hartsock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Shawn Hartsock
VMwareAPI-Team
Fix Committed
Critical
Shawn Hartsock

Bug Description

See: http://logs.openstack.org/52/71652/1/check/gate-nova-python27/28a0cd4/testr_results.html.gz

ft1.9645: nova.tests.virt.vmwareapi.test_driver_api.VMwareSessionTestCase.test_call_method_session_exception_StringException: Empty attachments:
  stdout

pythonlogging:'': {{{
DEBUG [stevedore.extension] found extension EntryPoint.parse('qpid = oslo.messaging._drivers.impl_qpid:QpidDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo.messaging._drivers.impl_zmq:ZmqDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo.messaging._drivers.impl_fake:FakeDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('log = oslo.messaging.notify._impl_log:LogDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('messagingv2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('noop = oslo.messaging.notify._impl_noop:NoOpDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('routing = oslo.messaging.notify._impl_routing:RoutingDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('test = oslo.messaging.notify._impl_test:TestDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('messaging = oslo.messaging.notify._impl_messaging:MessagingDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('qpid = oslo.messaging._drivers.impl_qpid:QpidDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('zmq = oslo.messaging._drivers.impl_zmq:ZmqDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('kombu = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('rabbit = oslo.messaging._drivers.impl_rabbit:RabbitDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('fake = oslo.messaging._drivers.impl_fake:FakeDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.no_op_notifier = oslo.messaging.notify._impl_noop:NoOpDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.test_notifier = oslo.messaging.notify._impl_test:TestDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier = oslo.messaging.notify._impl_messaging:MessagingDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.log_notifier = oslo.messaging.notify._impl_log:LogDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('nova.openstack.common.notifier.rpc_notifier2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('log = oslo.messaging.notify._impl_log:LogDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('messagingv2 = oslo.messaging.notify._impl_messaging:MessagingV2Driver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('noop = oslo.messaging.notify._impl_noop:NoOpDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('routing = oslo.messaging.notify._impl_routing:RoutingDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('test = oslo.messaging.notify._impl_test:TestDriver')
DEBUG [stevedore.extension] found extension EntryPoint.parse('messaging = oslo.messaging.notify._impl_messaging:MessagingDriver')
DEBUG [nova.utils] Reloading cached file /tmp/tmp.I4J731lqv7/tmpVVL7D0/tmpbzXyz0/policy.json
}}}

stderr: {{{
nova/tests/virt/vmwareapi/test_driver_api.py:175: DeprecationWarning: With-statements now directly support multiple context managers
  _fake_create_session),
}}}

Traceback (most recent call last):
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
    return func(*args, **keywargs)
  File "nova/tests/virt/vmwareapi/test_driver_api.py", line 183, in test_call_method_session_exception
    *args, **kwargs)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 393, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 404, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 454, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 385, in match
    reraise(*matchee)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 902, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "nova/virt/vmwareapi/driver.py", line 846, in _call_method
    'ex': exc})
  File "/usr/lib/python2.7/logging/__init__.py", line 1412, in debug
    self.logger.debug(msg, *args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1128, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1258, in _log
    self.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1268, in handle
    self.callHandlers(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 748, in handle
    self.emit(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 874, in emit
    self.handleError(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 846, in emit
    msg = self.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 723, in format
    return fmt.format(record)
  File "/usr/lib/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
  File "nova/virt/vmwareapi/error_util.py", line 45, in __str__
    return self.exception_summary + str(self.exception_obj)
TypeError: can only concatenate list (not "str") to list

... and ...

ft1.9783: process-returncode_StringException: Binary content:
  traceback (test/plain; charset="utf8")

Tags: vmware
Changed in nova:
importance: Undecided → Critical
status: New → In Progress
milestone: none → icehouse-3
Changed in openstack-vmwareapi-team:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Shawn Hartsock (hartsock)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/77995

Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → icehouse-rc1
Joe Gordon (jogo)
Changed in nova:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/77995
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1c6898efecd7d78855efcb22d9c38d6127339000
Submitter: Jenkins
Branch: master

commit 1c6898efecd7d78855efcb22d9c38d6127339000
Author: Shawn Hartsock <email address hidden>
Date: Tue Mar 4 15:33:15 2014 -0500

    VMware: VimException __str__ attempts to concatenate string to list

    Forces the correct parameter use in VimException and VimFaultException
    both exceptions have similar signatures but very different uses. This
    change forces a developer to deal with misuse of the exceptions
    early in their development cycle (provided the do due dilligence with
    their testing.)

    Closes-bug: 1287884

    Change-Id: I34753382677e3315ea4a71cfe9b3b82e9f9159bb

Changed in nova:
status: In Progress → Fix Committed
Changed in openstack-vmwareapi-team:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
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.