Antoni Segura Puimedon has uploaded a new change for review. Change subject: configNetwork: Fix bridgeless broken network deletion ......................................................................
configNetwork: Fix bridgeless broken network deletion When trying to delete a broken bridgeless vdsm network, if the iface referenced by the network definition was missing, delNetwork would not get any device on its call for vlan, nic and bonds, but objectivize would be called nonetheless, failing with a: ERR_BAD_PARAMS: 'Network defined without devices.' The fix consists on just removing the network from libvirt when the backing device is missing. Change-Id: I92c641d91da9ef7eab876ed8c77fff7a9becb503 Bug-Url: https://bugzilla.redhat.com/1020356 Signed-off-by: Antoni S. Puimedon <asegu...@redhat.com> --- M vdsm/configNetwork.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/22354/1 diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index 5fdd696..5db2a41 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -30,6 +30,7 @@ from vdsm import utils from storage.misc import execCmd import neterrors as ne +from netconf import libvirtCfg from neterrors import ConfigNetworkError from vdsm import netinfo from netconf.ifcfg import ConfigWriter @@ -322,6 +323,10 @@ _netinfo.networks[network] = netAttr if _netinfo.networks[network]['bridged']: _netinfo.networks[network]['ports'] = ConfigWriter.ifcfgPorts(network) + elif not os.path.exists('/sys/class/net/' + netAttr['iface']): + # Bridgeless broken network without underlying device + libvirtCfg.removeNetwork(network) + return delNetwork(network, configurator=configurator, force=True, implicitBonding=False, _netinfo=_netinfo) -- To view, visit http://gerrit.ovirt.org/22354 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92c641d91da9ef7eab876ed8c77fff7a9becb503 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches