Change in vdsm[master]: Mark netinfoTests.testGetIfaceByIP as a broken test

amuller at redhat.com amuller at redhat.com
Wed Nov 20 21:17:14 UTC 2013


Assaf Muller has posted comments on this change.

Change subject: Mark netinfoTests.testGetIfaceByIP as a broken test
......................................................................


Patch Set 2:

Sorry about that. Here's the context:
The problem with getIfaceByIP as it is now is in the case in which you've got 2+ devices with the same IP. With IPv4 I don't see it happening, but if IPv6 was configured on the management device then it is unlikely (but possible) that the same address will end up on another device. In that case, getIfaceByIP might return the wrong device.

The problem with the test is somewhat unrelated. Since python-ethtool-0.6-5, two regressions popped up *in the test*. We'll talk about a situation where ovirtmgmt is configured over eth0. The nic has no IP, but the bridge does. Both devices have the same link-local IPv6 address (As they're generated from the device's MAC address, which is the same for the bridge and the nic):
1) We now iterate through all devices, not only devices that have IP addresses. This means that eth0, which has an ip address of '', will be fed into getIfaceByIP, which will return '', and will then fail the assertion that 'eth0' == ''.
2) As both devices have the same IPv6 address, getIfaceByIP might return either the first or the second one. If the test iterates through eth0 first, and getIfaceByIP happens to return ovirtmgmt (They share the same IP) then the test will fail. If we iterate through ovirtmgmt first but getIfaceByIP returns eth0 then we'll fail in this case too.

The solution is to get rid of this approach all together.

-- 
To view, visit http://gerrit.ovirt.org/21471
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4c30963f80bf13bc99a059232ec435c1672b2def
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No


More information about the vdsm-patches mailing list