Antoni Segura Puimedon has uploaded a new change for review.
Change subject: network_linking: Apply whitelist to net conf. ......................................................................
network_linking: Apply whitelist to net conf.
Libvirt does not support updating through virDomainUpdateFlags some of the allowed configuration parameters for network cards. This patch introduces a whitelist that contains what is changeable and what is necessary to identify the nic, so other parameters like boot order are filtered out.
As more changes are supported by libvirt, this whitelist should grow.
Change-Id: Id567d05e98b2edd0595c762e706da425435cda3e Bug-Url: https://bugzilla.redhat.com/895294 Signed-off-by: Antoni S. Puimedon asegurap@redhat.com --- M vdsm/libvirtvm.py 1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/11148/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index d13dbb0..5f755aa 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -1650,6 +1650,12 @@ link = xml.dom.minidom.Element('link') vnicXML.appendChild(link) link.setAttribute('state', linkValue) + # Libvirt does not support changing boot order for net devices, nor + # specifying it in updateDeviceFlags.https://bugzilla.redhat.com/895294 + badTags = [tag for tag in vnicXML.childNodes if tag.nodeName not in + ('address', 'mac', 'model', 'source', 'filterref', 'link')] + for tag in badTags: + vnicXML.removeChild(tag) try: try: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'),
-- To view, visit http://gerrit.ovirt.org/11148 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Id567d05e98b2edd0595c762e706da425435cda3e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon asegurap@redhat.com