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

phoracek at redhat.com phoracek at redhat.com
Thu Nov 26 15:19:01 UTC 2015


Petr Horáček has uploaded a new change for review.

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>
---
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/45/49245/1

diff --git a/vdsm_hooks/ovs/ovs_before_network_setup.py b/vdsm_hooks/ovs/ovs_before_network_setup.py
index bea3c33..a35148d 100755
--- a/vdsm_hooks/ovs/ovs_before_network_setup.py
+++ b/vdsm_hooks/ovs/ovs_before_network_setup.py
@@ -177,9 +177,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)
         hooking.log('Hook finished, returning non-OVS networks and bondings '
                     'back to VDSM: %s' % setup_nets_config)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01033314b633d5ffa50b7d4ff8e0d4dcc2a8c048
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>


More information about the vdsm-patches mailing list