← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1534281] [NEW] Linux bridge unit test test_report_state_revived fails on OSX

 

Public bug reported:

Linux bridge unit test test_report_state_revived fails on OSX because
bridge_lib tries to use a Linux-specific check to find the list of
current bridges.  Mocking-out the method to just return a list of bridge
names fixes the issue.

This is the tox output:

neutron.tests.unit.plugins.ml2.drivers.linuxbridge.agent.test_linuxbridge_neutron_agent.TestLinuxBridgeAgent.test_report_state_revived
--------------------------------------------------------------------------------------------------------------------------------------

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2016-01-14 13:05:38,700  WARNING [neutron.agent.securitygroups_rpc] Driver configuration doesn't match with enable_security_group
    2016-01-14 13:05:38,700     INFO [neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent] RPC agent_id: lb000000000001
    2016-01-14 13:05:38,702     INFO [neutron.agent.l2.extensions.manager] Loaded agent extensions: []
    2016-01-14 13:05:38,703    ERROR [neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent] Failed reporting state!
    Traceback (most recent call last):
      File "neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 857, in _report_state
        devices = len(self.br_mgr.get_tap_devices())
      File "neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 531, in get_tap_devices
        for device in bridge_lib.get_bridge_names():
      File "neutron/agent/linux/bridge_lib.py", line 44, in get_bridge_names
        return os.listdir(BRIDGE_FS)
    OSError: [Errno 2] No such file or directory: '/sys/class/net/'
    

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py", line 467, in test_report_state_revived
        self.assertTrue(self.agent.fullsync)
      File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 702, in assertTrue
        raise self.failureException(msg)
    AssertionError: False is not true

** Affects: neutron
     Importance: Undecided
     Assignee: Brian Haley (brian-haley)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => Brian Haley (brian-haley)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1534281

Title:
  Linux bridge unit test test_report_state_revived fails on OSX

Status in neutron:
  In Progress

Bug description:
  Linux bridge unit test test_report_state_revived fails on OSX because
  bridge_lib tries to use a Linux-specific check to find the list of
  current bridges.  Mocking-out the method to just return a list of
  bridge names fixes the issue.

  This is the tox output:

  neutron.tests.unit.plugins.ml2.drivers.linuxbridge.agent.test_linuxbridge_neutron_agent.TestLinuxBridgeAgent.test_report_state_revived
  --------------------------------------------------------------------------------------------------------------------------------------

  Captured pythonlogging:
  ~~~~~~~~~~~~~~~~~~~~~~~
      2016-01-14 13:05:38,700  WARNING [neutron.agent.securitygroups_rpc] Driver configuration doesn't match with enable_security_group
      2016-01-14 13:05:38,700     INFO [neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent] RPC agent_id: lb000000000001
      2016-01-14 13:05:38,702     INFO [neutron.agent.l2.extensions.manager] Loaded agent extensions: []
      2016-01-14 13:05:38,703    ERROR [neutron.plugins.ml2.drivers.linuxbridge.agent.linuxbridge_neutron_agent] Failed reporting state!
      Traceback (most recent call last):
        File "neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 857, in _report_state
          devices = len(self.br_mgr.get_tap_devices())
        File "neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py", line 531, in get_tap_devices
          for device in bridge_lib.get_bridge_names():
        File "neutron/agent/linux/bridge_lib.py", line 44, in get_bridge_names
          return os.listdir(BRIDGE_FS)
      OSError: [Errno 2] No such file or directory: '/sys/class/net/'
      

  Captured traceback:
  ~~~~~~~~~~~~~~~~~~~
      Traceback (most recent call last):
        File "neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py", line 467, in test_report_state_revived
          self.assertTrue(self.agent.fullsync)
        File "/Users/haley/neutron/.tox/py27/lib/python2.7/site-packages/unittest2/case.py", line 702, in assertTrue
          raise self.failureException(msg)
      AssertionError: False is not true

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1534281/+subscriptions


Follow ups