Ido Barkan has uploaded a new change for review. Change subject: net: support hot(un)plugNic for SRIOV network devices. ......................................................................
net: support hot(un)plugNic for SRIOV network devices. The missing behavior was to automatically attach/detach the moving devices to/from the host. For this feature to be supported, a corresponding engine side patch is needed: I9bdf0d4cf9713691246015cf0297364a0dc40e95 Change-Id: I5997a5cc777edf6dc422495a0eb5aeff1d1c9440 Signed-off-by: Ido Barkan <ibar...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/50372/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 71126b3..0229509 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2011,6 +2011,8 @@ self.log.info("Hotplug NIC xml: %s", nicXml) try: + if nic.is_hostdevice: + hostdev.detach_detachable(params.get(hwclass.HOSTDEV)) self._dom.attachDevice(nicXml) except libvirt.libvirtError as e: self.log.exception("Hotplug failed") @@ -2272,6 +2274,8 @@ try: self._dom.detachDevice(nicXml) self._waitForDeviceRemoval(nic) + if nic and nic.is_hostdevice: + hostdev.reattach_detachable(nic.hostdev) except HotunplugTimeout as e: self.log.error("%s", e) return response.error('hotunplugNic', "%s" % e) -- To view, visit https://gerrit.ovirt.org/50372 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5997a5cc777edf6dc422495a0eb5aeff1d1c9440 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ido Barkan <ibar...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches