Change in vdsm[ovirt-3.2]: tool: _enable_bond_dev: reopen bonding_masters per bond

danken at redhat.com danken at redhat.com
Tue Feb 26 12:12:56 UTC 2013


Hello gena cher, Antoni Segura Puimedon,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/12447

to review the following change.

Change subject: tool: _enable_bond_dev: reopen bonding_masters per bond
......................................................................

tool: _enable_bond_dev: reopen bonding_masters per bond

Writing multiple +bondnames into /sys/class/net/bonding_masters is not
enough to add new bonding devices. One has to reopen that file for each
added bond.

Change-Id: I4693a3d2cc3beba0b5961d16fb1ef25170f99f9e
Signed-off-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/12409
Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
Tested-by: gena cher <genadic at gmail.com>
---
M vdsm-tool/load_needed_modules.py.in
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/12447/1

diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in
index 675a172..89c2b3f 100644
--- a/vdsm-tool/load_needed_modules.py.in
+++ b/vdsm-tool/load_needed_modules.py.in
@@ -45,8 +45,8 @@
 
     # @ENGINENAME@ currently assumes that all bonding devices pre-exist
     existing = set(file(MASTER_FILE).read().split())
-    with open(MASTER_FILE, 'w') as f:
-        for bond in REQUIRED - existing:
+    for bond in REQUIRED - existing:
+        with open(MASTER_FILE, 'w') as f:
             f.write('+%s\n' % bond)
 
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4693a3d2cc3beba0b5961d16fb1ef25170f99f9e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.2
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: gena cher <genadic at gmail.com>


More information about the vdsm-patches mailing list