Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1367269 - The uri_default in libvirt-admin.conf doesn't take effect
The uri_default in libvirt-admin.conf doesn't take effect
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Erik Skultety
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-16 02:03 EDT by Fangge Jin
Modified: 2016-11-03 14:53 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:53:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Fangge Jin 2016-08-16 02:03:44 EDT
Description of problem:
Set uri_default in libvirt-admin.conf, it doesn't take effect

Version-Release number of selected component (if applicable):
libvirt-2.0.0-5.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Set uri_default = "abcde" in libvirt-admin.conf

2. # virt-admin connect
   Connected to the admin server


Actual results:
Connect successfully


Expected results:
Failed to connect
Comment 2 Erik Skultety 2016-08-16 02:47:32 EDT
Fixed upstream by:

commit f5f32bcd1bb7d96b38c34a85658ac0996683f8bc
Author:     Erik Skultety <eskultet@redhat.com>
AuthorDate: Wed Jul 27 13:23:03 2016 +0200
Commit:     Erik Skultety <eskultet@redhat.com>
CommitDate: Fri Jul 29 09:21:09 2016 +0200

    admin: Fix default uri config option name s/admin_uri_default/uri_default
    
    The original name 'admin_uri_default' was introduced to our code by commit
    dbecb87f. However, at that time we already had a separate config file for
    admin library but the commit mentioned above didn't properly adjust the
    config's option name. The result is that when we're loading the config, we
    check a non-existent config option (there's not much to do with the URIs
    anyway, since we only allow local connection). Additionally, virt-admin's man
    page documents, that the default URI can be altered by setting
    admin_uri_default option. So the fix proposed by this patch leaves the
    libvirt-admin.conf as is and adjusts the naming in the code as well as in the
    virt-admin's man page.
    
    Signed-off-by: Erik Skultety <eskultet@redhat.com>
Comment 5 yanqzhan@redhat.com 2016-08-24 03:01:47 EDT
Reproduce this bug with libvirt-2.0.0-5.el7.x86_64
1.Set uri_default = "aaaaa" in libvirt-admin.conf:
# vim /etc/libvirt/libvirt-admin.conf
uri_default = "aaaaa"

2.# virt-admin "connect;uri"
Connected to the admin server

libvirtd:///system


Verify this bug with libvirt-2.0.0-6.el7.x86_64

For root user:
1.Set uri_default = "aaaaa" in libvirt-admin.conf:
# vim /etc/libvirt/libvirt-admin.conf
uri_default = "aaaaa"

2.# virt-admin connect
error: Failed to connect to the admin server
error: unsupported configuration: Unsupported URI scheme '<null>'

3.Keep default setting or set uri_default="libvirtd:///system" in libvirt-admin.conf, and do connect:
# virt-admin "connect;uri"
Connected to the admin server

libvirtd:///system


For session mode:
1.Login with a non-root user, set uri_default = "aaaaa" in libvirt-admin.conf
$ vim /home/test/.config/libvirt/libvirt-admin.conf
uri_default = "aaaaa"

2.$ virt-admin connect
error: Failed to connect to the admin server
error: unsupported configuration: Unsupported URI scheme '<null>'

3.Keep default setting or set uri_default="libvirtd:///session" in libvirt-admin.conf, and do connect:
$ virt-admin "connect;uri"
Connected to the admin server

libvirtd:///session

Since the result is as expected, mark this bug as verified.
Comment 7 errata-xmlrpc 2016-11-03 14:53:42 EDT
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/RHSA-2016-2577.html

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