2015-12-02 11:33:07 |
Bob Ball |
description |
Other virt drivers (libvirt: https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/vif.py#n448, hyperv: https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/hyperv/vif.py#n66) plug the VIFs when the vif_driver.plug() method is called. XenAPI's vif plug does not plug a device, but returns a dictionary - see https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vif.py#n133 - and then "plugs" it during VM creation - see https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vmops.py#n1881, called from https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vmops.py#n547.
This is broken with respect to the names in the interface and what other virt drivers are doing.
It has further led to functionality being implemented that does nothing, for example driver.plug_vifs and driver.unplug_vifs make calls to vif_driver.plug and vif_driver.unplug - but these do nothing.
We need to fix the code so that:
vif_driver.plug will create a new VIF for the VM record
vif_driver.unplug will destroy the VIF record from the VM, if it still exists. |
Other virt drivers (libvirt: https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/libvirt/vif.py#n448, hyperv: https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/hyperv/vif.py#n66) plug the VIFs when the vif_driver.plug() method is called.
XenAPI's vif plug does not plug a device, but returns a dictionary - see https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vif.py#n133 - and then "plugs" it during VM creation - see https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vmops.py#n1881, called from https://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vmops.py#n547.
This is broken with respect to the names in the interface and what other virt drivers are doing.
It has further led to functionality being implemented that does nothing, for example driver.plug_vifs and driver.unplug_vifs make calls to vif_driver.plug and vif_driver.unplug - but these do nothing.
We need to fix the code so that:
vif_driver.plug will create a new VIF for the VM record
vif_driver.unplug will destroy the VIF record from the VM, if it still exists. |
|