Bug 855651

Summary: Hot Plug Nic/Disk creates incorrect duplicate devices
Product: Red Hat Enterprise Virtualization Manager Reporter: Eli Mesika <emesika>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 3.1.0CC: bazulay, dyasny, gklein, iheim, lpeer, mkenneth, Rhev-m-bugs, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: si18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eli Mesika 2012-09-09 15:07:47 UTC
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;

Comment 1 Eli Mesika 2012-09-09 15:48:05 UTC
http://gerrit.ovirt.org/#/c/7881/

Comment 3 Martin Pavlik 2012-09-18 08:36:49 UTC
No additional disk or NIC appears now in SI18, verified