MAAS unit tests (at a minimum) are broken when bonding driver is loaded

Bug #1466151 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Mike Pontillo

Bug Description

When running unit tests, the following error was seen:

http://paste.ubuntu.com/11727748/ -

======================================================================
ERROR: metadataserver.deployment.tests.test_maas_configure_interfaces.TestMapInterfacesByMAC.test__integrates_with_real_sys_class_net
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/opt/src/maas/fix-bonding-test/src/metadataserver/deployment/tests/test_maas_configure_interfaces.py", line 181, in test__integrates_with_real_sys_class_net
    real_interfaces = script.map_interfaces_by_mac()
  File "/opt/src/maas/fix-bonding-test/src/metadataserver/deployment/maas_configure_interfaces.py", line 121, in map_interfaces_by_mac
    os.path.join('/sys/class/net', interface, 'address'))
  File "/opt/src/maas/fix-bonding-test/src/metadataserver/deployment/maas_configure_interfaces.py", line 100, in read_file
    with open(path, 'rb') as infile:
IOError: [Errno 20] Not a directory: u'/sys/class/net/bonding_masters/address'

----------------------------------------------------------------------

This could possibly occur in production as well (when the bonding driver is loaded), so we should fix this ASAP.

Related branches

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.