From Arik Hadas <ahadas(a)redhat.com>:
Arik Hadas has submitted this change and it was merged.
Change subject: core: make the unmanaged usb controller to be managed
......................................................................
core: make the unmanaged usb controller to be managed
The issue:
- a VM is started on an older (pre 4.0) engine
- in this engine, if the USB is configured as disabled, no USB device is sent
to VDSM
- libvirt reacts by creating a new unmanaged USB controller
- this controller appears in engine as an unmanaged device
- after updating the engine, update of all VMs is called to modify the devices
according to the need of the new engine
- this code adds a managed USB controller
- in this stage, this VM has 2 USB controllers, one managed and one unmanaged
- from this point, anytime the USB devices are about to be touched (e.g.
creating a new template from this VM or from a snapshot of the VM) a sanity
check checking that there is only 1 USB controller fails throwing an exception
The fix is to detect that the unmanaged device is the one created by
libvirt and adopt it as ours.
Another issue:
If there are two usb controller for the VM:
* managed, unplugged
* unmanaged, plugged
and a snapshot is made and then previewed, the VM has two managed usb
controllers. It is caused by the fact that OVF doesn't store 'managed'
flag.
To mitigate this, every time normal usb controllers are updated and
there are more then one managed controller, all controllers are removed
and the proper one is recreated.
Change-Id: I74f516530e9be5887b12720f0cdaee4618a9e9c9
Bug-Url:
https://bugzilla.redhat.com/1438188
Signed-off-by: Tomas Jelinek <tjelinek(a)redhat.com>
Signed-off-by: Jakub Niedermertl <jniederm(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
1 file changed, 55 insertions(+), 13 deletions(-)
Approvals:
Jakub Niedermertl: Verified
Jenkins CI: Passed CI tests
Arik Hadas: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/75133
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I74f516530e9be5887b12720f0cdaee4618a9e9c9
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>