[Kimchi-devel] [PATCH v2] [Kimchi] Issue #956: Unable to assign pci passthrough devices through kimchi

Samuel Henrique De Oliveira Guimaraes samuel.guimaraes at eldorado.org.br
Fri Jul 22 16:15:05 UTC 2016



-----Original Message-----
From: joserz at linux.vnet.ibm.com [mailto:joserz at linux.vnet.ibm.com] 
Sent: sexta-feira, 22 de julho de 2016 13:04
To: Aline Manera <alinefm at linux.vnet.ibm.com>
Cc: Samuel Henrique De Oliveira Guimaraes <samuel.guimaraes at eldorado.org.br>; sguimaraes943 at gmail.com; Kimchi Devel <kimchi-devel at ovirt.org>
Subject: Re: [Kimchi-devel] [PATCH v2] [Kimchi] Issue #956: Unable to assign pci passthrough devices through kimchi

On Fri, Jul 22, 2016 at 12:38:59PM -0300, Aline Manera wrote:
> 
> 
> On 07/22/2016 12:13 PM, joserz at linux.vnet.ibm.com wrote:
> >Aline,
> >
> >Actually it'sa backend issue. Today we are raise exceptions but we 
> >need to call the task callback for failure instead.
> >
> >For example, if you do this in your _attach_pci_device() ->
> >vmhostdevs.py:
> >
> >try:
> >     self._validate_pci_passthrough_env()
> >except:
> >     cb('Failed', False)
> >
> >you should see the error.
> >
> >However, there's a number of issues that can happen in this process 
> >and we need a way to send those error to the front-end in order to be 
> >able able to display each of them accordingly.
> 
> Why do not _validate_pci_passthrough_env() receives cb as parameter 
> and automatically updates the Task status?

I meant that we need to send the translated error message for any error to the frontend. I'll send a patch for that.

@Samuel, can you confirm if your code displays the message from the backend in case of failure?

The V2 now shows error message for both addVMPCIDevice() and removeVMPCIDevice() requests if they fail before creating a new task. If a task is created, once it is captured in the state "running" it will loop until it changes its status to "finished" or "failed". In case it fails, it will copy the task message and display as an error alert. 

Thank you

> 
> >On Thu, Jul 21, 2016 at 11:21:14PM +0000, Samuel Henrique De Oliveira Guimaraes wrote:
> >>When the reques tis completed, I receive some Ajax errors on the screenshots and the following output on Wok log:
> >>
> >>WOKOBJST0001E: Unable to find aedfc2e5-7cb2-4d48-9471-70d06d781e23 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>aedfc2e5-7cb2-4d48-9471-70d06d781e23 in datastore
> >>WOKOBJST0001E: Unable to find 29b4f639-ce59-4ae6-a0f1-667fddae3bb5 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>29b4f639-ce59-4ae6-a0f1-667fddae3bb5 in datastore
> >>WOKOBJST0001E: Unable to find 24b61c72-d0f8-48e7-802c-ce6aadbb05a5 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>24b61c72-d0f8-48e7-802c-ce6aadbb05a5 in datastore
> >>WOKOBJST0001E: Unable to find 3f59d60a-206c-4917-ba74-24edfc23cd36 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>3f59d60a-206c-4917-ba74-24edfc23cd36 in datastore
> >>WOKOBJST0001E: Unable to find 454edf01-8a0e-4ee4-abf7-21a49d7471f0 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>454edf01-8a0e-4ee4-abf7-21a49d7471f0 in datastore
> >>WOKOBJST0001E: Unable to find aeebc4a1-5815-423c-8a1f-a04882d81dae 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>aeebc4a1-5815-423c-8a1f-a04882d81dae in datastore
> >>WOKOBJST0001E: Unable to find 7bc8625c-8ec3-48e5-b7f7-7cf7956951b6 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>7bc8625c-8ec3-48e5-b7f7-7cf7956951b6 in datastore
> >>WOKOBJST0001E: Unable to find 2c2f4ef0-7ce0-4aad-b6c8-b891d21fbf40 
> >>in datastore
> >>ERROR:cherrypy.error:WOKOBJST0001E: Unable to find 
> >>2c2f4ef0-7ce0-4aad-b6c8-b891d21fbf40 in datastore
> >>
> >>I've added some console.log('') messages between the getOngoingAttachingDevices function to make sure that it is running and it does runs after the "/plugins/kimchi/vms/*guest*/hostdevs/" request is completed but it is too late to filter for failed devices. I can remove the filter for tasks that are running and always show the latest failure message but I don't think this should be the proper way to tackle this issue.
> >>
> >>-----Original Message-----
> >>From: kimchi-devel-bounces at ovirt.org 
> >>[mailto:kimchi-devel-bounces at ovirt.org] On Behalf Of Samuel Henrique 
> >>De Oliveira Guimaraes
> >>Sent: quinta-feira, 21 de julho de 2016 19:54
> >>To: Aline Manera <alinefm at linux.vnet.ibm.com>; 
> >>sguimaraes943 at gmail.com; Kimchi Devel <kimchi-devel at ovirt.org>
> >>Subject: Re: [Kimchi-devel] [PATCH v2] [Kimchi] Issue #956: Unable 
> >>to assign pci passthrough devices through kimchi
> >>
> >>I think there's a timeout issue when attaching a PCI device. The same doesn't happen when you try to detach it. The first time I try to attach the device, the browser network console shows that the 'kimchi/vms/*vm*/hostdevs' request is not finished, so for this I'll have to show the "loading" backdrop before the "process" callback starts. The problem is that by the time it runs the function getOngoingAttachingDevices() it doesn't show any result because the task already failed.
> >>
> >>Samuel
> >>
> >>-----Original Message-----
> >>From: kimchi-devel-bounces at ovirt.org 
> >>[mailto:kimchi-devel-bounces at ovirt.org] On Behalf Of Aline Manera
> >>Sent: quinta-feira, 21 de julho de 2016 18:12
> >>To: sguimaraes943 at gmail.com; Kimchi Devel <kimchi-devel at ovirt.org>
> >>Subject: Re: [Kimchi-devel] [PATCH v2] [Kimchi] Issue #956: Unable 
> >>to assign pci passthrough devices through kimchi
> >>
> >>Almost there! =)
> >>
> >>I noticed the following:
> >>
> >>1. Tried to attach a device
> >>2. Task was created but it failed
> >>
> >>[alinefm at alinefm-TP440 wok]$ curl -H "Content-Type: 
> >>application/json" -H
> >>"Accept: application/json" -k 
> >>https://localhost:8001/plugins/kimchi/tasks/2
> >>{
> >>    "status":"failed",
> >>    "message":"KCHVMHDEV0003E: No IOMMU groups found. Host PCI pass through needs IOMMU group to function correctly. Please enable Intel VT-d or AMD IOMMU in your BIOS, then verify the Kernel is compiled with IOMMU support. For Intel CPU, add 'intel_iommu=on' to GRUB_CMDLINE_LINUX parameter in /etc/default/grub file. For AMD CPU, add 'iommu=pt iommu=1'.",
> >>    "id":"2",
> >>    "target_uri":"/plugins/kimchi/vms/opensuse42.1/hostdevs/"
> >>}[
> >>
> >>3. I could see a request on
> >>/tasks?target_uri=status=running&target_uri=/plugins/kimchi/vms/*nam
> >>e*/hostdevs
> >>
> >>The problem is the task status is failed. So it is running nothing and no error is shown.
> >>
> >>On 07/21/2016 05:49 PM, sguimaraes943 at gmail.com wrote:
> >>>From: Samuel Guimarães <sguimaraes943 at gmail.com>
> >>>
> >>>This commit fixes an issue with PCI passthrough devices through Kimchi.
> >>>It also addresses an enhancement to display success messages when some actions doesn't require the Save button and there's no UI feedback to the user (Issue #975).
> >>>
> >>>v2 - Added error callbacks for kimchi.addVMPCIDevice() and kimchi.removeVMPCIDevice() to display error messages before if starts to track ongoing tasks.
> >>>
> >>>Samuel Guimarães (1):
> >>>    Issue #956: Unable to assign pci passthrough devices through 
> >>>kimchi
> >>>
> >>>   model/vmhostdevs.py                  |   2 +-
> >>>   ui/css/kimchi.css                    |   5 +
> >>>   ui/css/src/modules/_edit-guests.scss |   4 +
> >>>   ui/js/src/kimchi.guest_edit_main.js  | 236 +++++++++++++++++++++++------------
> >>>   ui/js/src/kimchi.guest_main.js       |  10 +-
> >>>   ui/pages/guest-edit.html.tmpl        |  20 ++-
> >>>   ui/pages/i18n.json.tmpl              |   2 +
> >>>   7 files changed, 180 insertions(+), 99 deletions(-)
> >>>
> >>_______________________________________________
> >>Kimchi-devel mailing list
> >>Kimchi-devel at ovirt.org
> >>http://lists.ovirt.org/mailman/listinfo/kimchi-devel
> >>_______________________________________________
> >>Kimchi-devel mailing list
> >>Kimchi-devel at ovirt.org
> >>http://lists.ovirt.org/mailman/listinfo/kimchi-devel
> >>_______________________________________________
> >>Kimchi-devel mailing list
> >>Kimchi-devel at ovirt.org
> >>http://lists.ovirt.org/mailman/listinfo/kimchi-devel
> 



More information about the Kimchi-devel mailing list