Change in vdsm[master]: net: api: move netinfo update and save one call

phoracek at redhat.com phoracek at redhat.com
Fri Feb 19 15:32:44 UTC 2016


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

Change subject: net: api: move netinfo update and save one call
......................................................................

net: api: move netinfo update and save one call

The last _netinfo.updateDevice() call was not necessary.

Change-Id: Ic4dd7572986ffee5a2060470d904116d04e80c97
Signed-off-by: Petr Horáček <phoracek at redhat.com>
---
M lib/vdsm/network/api.py
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/53760/1

diff --git a/lib/vdsm/network/api.py b/lib/vdsm/network/api.py
index f99a3c3..2929fc6 100644
--- a/lib/vdsm/network/api.py
+++ b/lib/vdsm/network/api.py
@@ -695,14 +695,14 @@
 
 
 def _net_setup(configurator, networks, bondings, logger, _netinfo):
-    # We need to use the newest host info
-    _netinfo.updateDevices()
-
     connectivity_check_networks = set()
 
     for network, attrs in networks.iteritems():
         if 'remove' in attrs:
             continue
+
+        # we need to use the newest info, things like a bond mtu can change
+        _netinfo.updateDevices()
 
         bond = attrs.get('bonding')
         if bond:
@@ -720,8 +720,6 @@
                                          configurator)
             raise
         connectivity_check_networks.add(network)
-
-        _netinfo.updateDevices()  # Things like a bond mtu can change
 
 
 def _get_connectivity_timeout(options):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4dd7572986ffee5a2060470d904116d04e80c97
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