Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1061802 - libgovirt should return error to remote-viewer when VM is not found (instead of empty connection info)
Summary: libgovirt should return error to remote-viewer when VM is not found (instead ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libgovirt
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Christophe Fergeau
QA Contact: SPICE QE bug list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-05 16:21 UTC by David Jaša
Modified: 2016-06-02 13:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-27 15:37:15 UTC


Attachments (Terms of Use)

Description David Jaša 2014-02-05 16:21:54 UTC
Description of problem:
libgovirt should return error to remote-viewer when VM is not found (instead of empty connection info)

Version-Release number of selected component (if applicable):
libgovirt-0.1.0-3.el7.x86_64.rpm  

How reproducible:
always

Steps to Reproduce:
1. remote-viewer ovirt://rhevm.example.com/made_up_vm
2.
3.

Actual results:
libgovirt says several times:
(remote-viewer:5620): libgovirt-CRITICAL **: ovirt_resource_set_description_from_xml: assertion 'desc_node->content != NULL' failed
followed by single line of virt-viewer:
(remote-viewer:5620): remote-viewer-CRITICAL **: create_ovirt_session: assertion 'vm != NULL' failed

Expected results:
libgovirt reports error to remote-viewer that in turn presents error message to the user

Additional info:
IIUC the code correctly the problem is caused by getting VM info by calling ovirt_resource_set_description_from_xml() in a part of ovirt_resource_init_from_xml_real() function that always returns TRUE and no functions called before these handle NULL values of essential connection parameters

Comment 3 Christophe Fergeau 2016-04-27 15:37:15 UTC
This has been improved by https://git.fedorahosted.org/cgit/virt-viewer.git/commit/?id=7a47a4da08acf17efd95f5afc2aeb220ee31443c
"Show VM chooser dialog when oVirt VM name is missing" (it shows it when the VM is wrong as well). This commit is part of virt-viewer 2.0, which is what we have in EL7, so I think this bug is already fixed.
I haven't tested the exact combination of rhel7 libgovirt+virt-viewer, just rhel7 virt-viewer, but I'll close this bug for now, we can reopen it if I was wrong and something's still missing on libgovirt side.


Note You need to log in before you can comment on or make changes to this bug.