Petr Šebek has uploaded a new change for review.

Change subject: Bond destroying
......................................................................

Bond destroying

If there is deleted network with bond other than bond[0-4] and no
other network is using that bond, the bond is destroyed. It prevents
accumulation poorly named bonds.

Change-Id: I0cd27f1ff9a62e202c3513e54df5481d1b72ed7c
Bug-Url: https://bugzilla.redhat.com/928442
Signed-off-by: Petr Sebek <[email protected]>
---
M vdsm/configNetwork.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/52/13752/1

diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 2a85e34..dd362c1 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -516,6 +516,10 @@
     def removeBonding(self, bonding):
         self._backup(netinfo.NET_CONF_PREF + bonding)
         self._removeFile(netinfo.NET_CONF_PREF + bonding)
+        if bonding not in ['bond0', 'bond1', 'bond2', 'bond3', 'bond4']:
+            with open(BONDING_MASTERS, 'w') as f:
+                f.write("-%s\n" % bonding)
+
 
     def removeBridge(self, bridge):
         ifdown(bridge)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cd27f1ff9a62e202c3513e54df5481d1b72ed7c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Šebek <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to