Description of problem: Hot Plug Nic/Disk creates incorrect duplicate devices. The Hot Plug Nic/Disk commands does not set the deviceId field. When we get run time info for VDSM, we are looking for the deviceId field, it is is not found, the device is assumed to be an unmanaged device reported to us as a new device by VDSM (i.e. dose not exists in or DB yet) This will result in a duplicate of each Nic/Disk that is marked as managed device with another coy (with diffrent GUID) in vm_device that is marked as an unmanaged device while the last (and incorrect device) will get the address and alias field updates. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.Create a VM from a template that has OS installed 2.Run the VM 3.Add a disk 4.Check vm_device table and see that this disk is added as a managed device 5.Activate the new disk 6.Check vm_device table again, you have now additional unmanaged disk Actual results: Activate Disk/Nic cause duplicate of devices with incorrect data. Expected results: No duplication of devices should occur on Activate Disk/Nic Additional info: Query for 4. and 6. select device,is_plugged,is_managed,alias from vm_device,vm_static where vm_id = vm_guid and vm_name ilike 'your-vm-name-here' order by alias;
http://gerrit.ovirt.org/#/c/7881/
No additional disk or NIC appears now in SI18, verified