[node-patches] Change in ovirt-node[master]: network: Fix bridges for el6 and ifcfg

asegurap at redhat.com asegurap at redhat.com
Fri Aug 9 12:34:02 UTC 2013


Antoni Segura Puimedon has uploaded a new change for review.

Change subject: network: Fix bridges for el6 and ifcfg
......................................................................

network: Fix bridges for el6 and ifcfg

ifcfg can't ifup or ifup bridges unless /usr/sbin/brctl, that is
provided by bridge-utils is installed (Fedora19 does not install
it by default).

ip link del dev X type bridge is a not supported operation on
2.6.32 kernels that are found in el6 distros.

This patch fixes both things while keeping it compatible with
newer distros.

Change-Id: Ib798a5581191d835f68bd4324c2182ff28cab4a6
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M ovirt-node.spec.in
M src/ovirt/node/utils/network.py
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/68/17868/1

diff --git a/ovirt-node.spec.in b/ovirt-node.spec.in
index d583f2e..dec41ef 100644
--- a/ovirt-node.spec.in
+++ b/ovirt-node.spec.in
@@ -43,6 +43,7 @@
 %endif
 Requires:       libvirt >= 0.9.2, libvirt-python
 Requires:       augeas >= 0.3.5
+Requires:       bridge-utils
 Requires:       udev >= 147-2.34
 Requires:       wget
 Requires:       cyrus-sasl-gssapi cyrus-sasl >= 2.1.22
diff --git a/src/ovirt/node/utils/network.py b/src/ovirt/node/utils/network.py
index a10dfbc..5f3ca42 100644
--- a/src/ovirt/node/utils/network.py
+++ b/src/ovirt/node/utils/network.py
@@ -802,7 +802,7 @@
         if not self.is_bridge(ifname):
             raise RuntimeError("Can no delete '%s', is no bridge" % ifname)
         process.call(["ip", "link", "set", "dev", ifname, "down"])
-        process.call(["ip", "link", "delete", ifname, "type", "bridge"])
+        process.call(["brctl", "delbr", ifname])
 
 
 class Bonds(base.Base):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib798a5581191d835f68bd4324c2182ff28cab4a6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>



More information about the node-patches mailing list