Bug 1201846

Summary: remove unnecessary warning when connect to ovirt URI
Product: Red Hat Enterprise Linux 6 Reporter: Christophe Fergeau <cfergeau>
Component: libgovirtAssignee: Christophe Fergeau <cfergeau>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 6.7CC: cfergeau, dblechte, djasa, fidencio, juzhou, mzhan, pgrunt, rbalakri, rduda, tpelka, tzheng, virt-bugs, virt-viewer-maint, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libgovirt-0.3.2-2.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1201599 Environment:
Last Closed: 2017-03-21 09:15:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1201599    
Bug Blocks:    

Comment 8 Christophe Fergeau 2016-03-17 09:20:42 UTC
Ah this removed the
(remote-viewer:27104): libgovirt-WARNING **: could not find node storage_domain_state
warnings.

Removing these warnings:
(remote-viewer:27104): libgovirt-WARNING **: Passing a full http:// or https:// URI to ovirt_proxy_new() is deprecated

(remote-viewer:27104): libgovirt-WARNING **: Passing an URI ending in /api to ovirt_proxy_new() is deprecated

is a different thing and would be done in remote-viewer.

Comment 9 David Jaša 2016-03-17 11:20:33 UTC
(In reply to Christophe Fergeau from comment #8)
> Ah this removed the
> (remote-viewer:27104): libgovirt-WARNING **: could not find node
> storage_domain_state
> warnings.
> 
> Removing these warnings:
> (remote-viewer:27104): libgovirt-WARNING **: Passing a full http:// or
> https:// URI to ovirt_proxy_new() is deprecated
> 
> (remote-viewer:27104): libgovirt-WARNING **: Passing an URI ending in /api
> to ovirt_proxy_new() is deprecated
> 
> is a different thing and would be done in remote-viewer.

$ remote-viewer --spice-ca-file .pki/tls/certs/rhevm35.pem ovirt://user.com/vm_name
(...)
(remote-viewer:6207): GSpice-WARNING **: Invalid port value 0
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'storage_domain_state'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node storage_domain_state
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'available'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node available
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'used'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node used
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'storage_domain_state'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node storage_domain_state
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'available'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node available
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'used'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node used
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'storage_domain_state'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node storage_domain_state
(remote-viewer:6207): libgovirt-DEBUG: could not find XML node 'storage_domain_state'
(remote-viewer:6207): libgovirt-DEBUG: Could not find node storage_domain_state
(remote-viewer:6207): libgovirt-DEBUG: Setting fake 'name' for cdrom resource

so there are even those "Could not find node storage_domain_state" messages printed, among others...

Comment 10 Christophe Fergeau 2016-03-17 13:41:30 UTC
Ah, I've taken this bug very literally

Actual results:
At step 4,
libgovirt-WARNING log, seems unnecessary

Expected results:
Remove the unnecessary log

I've changed it to g_debug() which effectively silences it on recent glib versions. I forgot that RHEL6 glib shows g_debug by default, which indeed makes the g_warning->g_debug change not that useful on RHEL6 :(
The "Could not find XML node xx" and "could not find node xx" are also redundant, I've fixed this upstream
https://git.gnome.org/browse/libgovirt/commit/?id=6ed718ec0103b302ff6c38f22ee4256d2a656c9f

I suggest that we open a bug against virt-viewer to get rid of the first 2 warnings, and that we live with these DEBUG messages.

Comment 13 Christophe Fergeau 2016-07-26 13:16:38 UTC
Moving this to POST to add https://git.gnome.org/browse/libgovirt/commit/?id=6ed718ec0103b302ff6c38f22ee4256d2a656c9f to the build.
The other warnings will need to be fixed on virt-viewer side.
The fact that g_debug() messages appear on stdout by default is imo a glib issue, and not something I want to workaround in libgovirt.

With the patch mentioned above, this bug against libgovirt can imo be closed.

Comment 16 Radek Duda 2016-12-08 13:58:33 UTC
verified on rhel6.9 client and rhel 7.3 guests:

1. reproduced old behaviour (with libgovirt 0.3.2-1.el6):
$ remote-viewer ovirt://$username%40$domain@${rhv-server}/$vmname --ovirt--ca-file $cafile -spice-ca-file $scafile


libgovirt-WARNING log messages were displayed


2. upgraded to libgovirt 0.3.2-1.el6:
no libgovirt-WARNING messages were displayed

Comment 18 errata-xmlrpc 2017-03-21 09:15:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0587.html