Ondřej Svoboda has uploaded a new change for review.

Change subject: network: Inexistence of a network in libvirt should not be 
fatal to us
......................................................................

network: Inexistence of a network in libvirt should not be fatal to us

vdsm-restore-net-config (with unified persistence) is called often during
functional network tests. This is a rollback scenario and connectivity
is at stake.

A network missing in libvirt is a sign of a different failure
(and we are after you, traffic control!) but it must not harm the restoration
of networking (not only) after failed tests.

Change-Id: Ia6ae4b359d543b6e3ee560a5cb021e31d037c035
Signed-off-by: Ondřej Svoboda <osvob...@redhat.com>
---
M vdsm/network/api.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/34988/1

diff --git a/vdsm/network/api.py b/vdsm/network/api.py
index 1b09c6c..4a2b0c5 100755
--- a/vdsm/network/api.py
+++ b/vdsm/network/api.py
@@ -691,9 +691,9 @@
                     del libvirt_nets[network]
                 _netinfo.updateDevices()
             elif 'remove' in networkAttrs:
-                raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, "Cannot delete "
-                                         "network %r: It doesn't exist in the "
-                                         "system" % network)
+                logger.warning("Not deleting network {0!r}: it is unknown to "
+                               "libvirtd".format(network))
+                del networks[network]
             else:
                 networksAdded.add(network)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6ae4b359d543b6e3ee560a5cb021e31d037c035
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to