[node-patches] Change in ovirt-node[ovirt-3.6]: Bridge.slave_for_nic needs to exclude vnet devices
rbarry at redhat.com
rbarry at redhat.com
Wed Mar 30 14:11:53 UTC 2016
Ryan Barry has uploaded a new change for review.
Change subject: Bridge.slave_for_nic needs to exclude vnet devices
......................................................................
Bridge.slave_for_nic needs to exclude vnet devices
The original patch relied on sorting the list of devices to
ensure that e.* ethernet devices and bonds appeared at the list,
but just exclude vnet devices, and we will only get one result
Change-Id: Ib84b539b32a8a78b3bd35bd39b2ca8ae7a87e1fa
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1280241
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1300188
Signed-off-by: Ryan Barry <rbarry at redhat.com>
(cherry picked from commit 27d9959007502ea7c555c099b0388eefe1cd4bd4)
---
M src/ovirt/node/utils/network.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/86/55486/1
diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py
index 6220d96..398219c 100755
--- a/src/ovirt/node/utils/network.py
+++ b/src/ovirt/node/utils/network.py
@@ -885,7 +885,8 @@
def slave_for_bridge(self, nic):
try:
- slave = os.listdir("/sys/class/net/%s/brif" % nic.ifname)[0]
+ slave = [n for n in os.listdir("/sys/class/net/%s/brif"
+ % nic.ifname) if "vnet" not in n].pop()
nic = NIC(slave)
except IndexError:
# No slaves. ;vdsmdummy; ?
--
To view, visit https://gerrit.ovirt.org/55486
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib84b539b32a8a78b3bd35bd39b2ca8ae7a87e1fa
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list