Change in vdsm[ovirt-3.6]: hooks: ovs: run ovs _configure only if there are changes to do

phoracek at redhat.com phoracek at redhat.com
Mon Dec 7 12:09:57 UTC 2015


Hello Dan Kenigsberg,

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

    https://gerrit.ovirt.org/49977

to review the following change.

Change subject: hooks: ovs: run ovs _configure only if there are changes to do
......................................................................

hooks: ovs: run ovs _configure only if there are changes to do

Change-Id: I01033314b633d5ffa50b7d4ff8e0d4dcc2a8c048
Signed-off-by: Petr Horáček <phoracek at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/49245
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Bug-Url: https://bugzilla.redhat.com/1234867
---
M vdsm_hooks/ovs/ovs_before_network_setup.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/49977/1

diff --git a/vdsm_hooks/ovs/ovs_before_network_setup.py b/vdsm_hooks/ovs/ovs_before_network_setup.py
index 6cc1f14..fa8cfb5 100755
--- a/vdsm_hooks/ovs/ovs_before_network_setup.py
+++ b/vdsm_hooks/ovs/ovs_before_network_setup.py
@@ -182,9 +182,10 @@
     else:
         ovs_nets, non_ovs_nets, ovs_bonds, non_ovs_bonds = \
             _separate_ovs_nets_bonds(networks, bondings, running_config)
-        _configure(ovs_nets, ovs_bonds, running_config)
-        _set_nets_bonds(setup_nets_config['request'], non_ovs_nets,
-                        non_ovs_bonds)
+        if ovs_nets or ovs_bonds:
+            _configure(ovs_nets, ovs_bonds, running_config)
+            _set_nets_bonds(setup_nets_config['request'], non_ovs_nets,
+                            non_ovs_bonds)
         log('Hook finished, returning non-OVS networks and bondings back to '
             'VDSM: %s' % setup_nets_config)
 


-- 
To view, visit https://gerrit.ovirt.org/49977
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01033314b633d5ffa50b7d4ff8e0d4dcc2a8c048
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>


More information about the vdsm-patches mailing list