fix logic in NvpApiException

Bug #1228969 reported by Sean McCully
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vmware-nsx
New
Undecided
Unassigned

Bug Description

ERROR: neutron.tests.unit.nicira.test_nvplib.TestNvplibLogicalRouters.test_update_lrouter_port_ips_nvp_exception_raises
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/tests/unit/nicira/test_nvplib.py", line 884, in test_update_lrouter_port_ips_nvp_exception_raises
    lrouter_port['uuid'], [], [])
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 394, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 99, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 61, in match
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 386, in match
    reraise(*matchee)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 92, in match
    result = matchee()
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 867, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/plugins/nicira/nvplib.py", line 1343, in update_lrouter_port_ips
    "router logical port:%s") % str(e)
TypeError: __str__ returned non-string (type Message)

This is sometimes failing and sometimes not!!!!!

Changed in neutron:
assignee: nobody → Sean McCully (sean-mccully)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: New → In Progress
Revision history for this message
Sean McCully (sean-mccully) wrote :

This appears related,

ERROR: neutron.tests.unit.nicira.test_nvplib.TestNvplibSecurityProfile.test_delete_non_existing_securityprofile_raises
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/tests/unit/nicira/test_nvplib.py", line 1211, in test_delete_non_existing_securityprofile_raises
    self.fake_cluster, 'whatever')
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 394, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 99, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 61, in match
    mismatch = matcher.match(matchee)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 386, in match
    reraise(*matchee)
  File "/usr/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 92, in match
    result = matchee()
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 867, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/plugins/nicira/nvplib.py", line 1152, in delete_security_profile
    LOG.error(format_exception("Unknown", e, locals()))
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/plugins/nicira/nvplib.py", line 1047, in format_exception
    return ' '.join(msg)
TypeError: sequence item 0: expected string, Message found

Lee Li (lilinguo)
Changed in neutron:
assignee: Sean McCully (sean-mccully) → Lee Li (lilinguo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

no longer affects: neutron
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.