Change in vdsm[master]: network: check for bridge changes only if unified persistenc...

phoracek at redhat.com phoracek at redhat.com
Fri May 22 13:20:45 UTC 2015


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

Change subject: network: check for bridge changes only if unified persistence is used
......................................................................

network: check for bridge changes only if unified persistence is used

In _should_keep_bridge we use running configurator to check if we should
keep bridge or remove it. Running configurator is available only when we
use unified persistence.

If we use ifcfg persistence, set keep_bridge always to False.

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/41349/1

diff --git a/vdsm/network/api.py b/vdsm/network/api.py
index 6071f8d..dd55664 100755
--- a/vdsm/network/api.py
+++ b/vdsm/network/api.py
@@ -422,7 +422,7 @@
 def _delNonVdsmNetwork(network, vlan, bonding, nics, _netinfo, configurator):
     if network in netinfo.bridges():
         net_ent = _objectivizeNetwork(bridge=network, vlan=vlan,
-                                      bonding=bonding,  nics=nics,
+                                      bonding=bonding, nics=nics,
                                       _netinfo=_netinfo,
                                       configurator=configurator,
                                       implicitBonding=False)
@@ -838,12 +838,17 @@
         for network, attrs in networks.items():
             if network in _netinfo.networks:
                 logger.debug("Removing network %r", network)
-                running_conf = configurator.runningConfig.networks.get(network)
-                keep_bridge = _should_keep_bridge(
-                    network_attrs=attrs,
-                    currently_bridged=_netinfo.networks[network]['bridged'],
-                    network_running_config=running_conf
-                )
+                if config.get('vars', 'net_configurator') == 'unified':
+                    running_conf = configurator.runningConfig.networks.get(
+                        network)
+                    keep_bridge = _should_keep_bridge(
+                        network_attrs=attrs,
+                        currently_bridged=_netinfo.networks[network][
+                            'bridged'],
+                        network_running_config=running_conf
+                    )
+                else:
+                    keep_bridge = False
 
                 _delNetwork(network, configurator=configurator, force=force,
                             implicitBonding=False, _netinfo=_netinfo,


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

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