From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: vm: create a vnic with vhostuser backend ......................................................................
Patch Set 31:
(1 comment)
https://gerrit.ovirt.org/#/c/74327/31/lib/vdsm/virt/vmdevices/network.py File lib/vdsm/virt/vmdevices/network.py:
Line 303: detach_detachable(self.hostdev) Line 304: else: Line 305: bridge_info = supervdsm.getProxy().ovs_bridge(self.network) Line 306: if bridge_info and bridge_info['dpdk_enabled']: Line 307: self._is_vhostuser = True
This becomes too complicated.
It's sad that we need to store data just in order not to bother supervdsm during __init__. But yes, it's my option 1.
I kinda likeMartin's suggestion. in vm.py we can have
if not self.recovering: self._setup_devices() else: self._recover_devices() # <== add this
which should call a device.recover() which would speak with supervdsm. Line 308: self._create_vhost_port(bridge_info['name']) Line 309: Line 310: def teardown(self): Line 311: if self.is_hostdevice: