Description of problem: when spec_params value is empty on a VM with attached devices, in some cases the webadmin would not show attached devices under virtul machines tab > attached devices. this means devices cannot be removed from VM. Version-Release number of selected component (if applicable): rhevm-3.6.0.3-0.1.el6 (3.6.0-18) libvirt-client-1.2.17-5.el7.x86_64 sanlock-3.2.4-1.el7.x86_64 vdsm-4.17.10.1-0.el7ev.noarch qemu-kvm-rhev-2.3.0-31.el7.x86_64 How reproducible: ~50% Steps to Reproduce: 1. Create VM and attach some devices to it. 2. From webadmin, navigate to virtual machines tab > host devices. 3. Actual results: In some cases VM host devices list will be empty. Observing engine DB shows that there are no values for spec_params: engine=# select spec_params from vm_device where vm_id='26fc68af-6431-4885-aec9-e85720214650'; spec_params -------------------- { } { } { } { } { "path" : "" } { } { } { } { } { } { "heads" : "1", "vram" : "32768" } (12 rows) Expected results: host devices should be listed. Additional info: engine log attached.
Nisim: when dumping host devices please restrict the query only to include devices of type 'hostdev' since for other device types empty spec params may be valid state: select spec_params from vm_device where vm_id='26fc68af-6431-4885-aec9-e85720214650' and type='hostdev';
Created attachment 1093294 [details] engine log
Fixed bug tickets must have version flags set prior to fixing them. Please set the correct version flags and move the bugs back to the previous status after this is corrected.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset. Please set the correct milestone or add the z-stream flag.
please make sure to give the bug the right values: 1. bug was fixed before ovirt-3.6.1 1st build was done, therefore if fixed before it should be targeted to the nearest milestone, i.e: ovirt-3.6.1 (otherwise why work on it and not prioritize another 3.6.1 bug?) 2. target release missing - please consult with the ovirt-engine maintainer & builder - in this case Sandro bonzzola and ask on the planned tag for the build, in this case 'ovirt-engine-3.6.1' - this should be the TR (3.6.1). 3. bug was left on modified, even though it was included in last build, the reason it didn't move to ON_QA is because the milestone was set to a future milestone, please make sure on next releases to verify all the relevant bugs are moved and that are TM & TR are set. in the build: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs%2Fheads%2Fovirt-engine-3.6.1
Verified: rhevm-3.6.2.6-0.1.el6 sanlock-3.2.4-1.el7.x86_64 vdsm-4.17.17-0.el7ev.noarch libvirt-client-1.2.17-13.el7_2.2.x86_64 qemu-kvm-rhev-2.3.0-31.el7_2.4.x86_64 Verification scenario: 1. Run VM with GPU and host devices attached. 2. Verify no empty "spec_params" values in engine DB: engine=# select spec_params from vm_device where vm_id='22a0c0b2-06e5-4079-ad0a-a9f42d39d171' and type='hostdev'; spec_params ------------------------------ { "iommuPlaceholder" : true } { "iommuPlaceholder" : false } { "iommuPlaceholder" : false } { "iommuPlaceholder" : false } (4 rows) engine=#