RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1357364 - The uri_aliases setting in libvirt-admin.conf doesn't take effect.
Summary: The uri_aliases setting in libvirt-admin.conf doesn't take effect.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-18 05:20 UTC by Fangge Jin
Modified: 2016-11-03 18:50 UTC (History)
7 users (show)

Fixed In Version: libvirt-2.0.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:50:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-07-18 05:20:41 UTC
Description of problem:
The uri_aliases setting in libvirt-admin.conf doesn't take effect.

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

How reproducible:
100%

Steps to Reproduce:
1.Set uri_aliases in libvirt-admin.conf:

uri_aliases = [
  "admin=libvirtd:///system",
]

2. # systemctl restart libvirtd

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


Actual results:
Connect failed.

Expected results:
Virt-admin connects to libvirtd:///system successfully

Comment 1 Fangge Jin 2016-07-18 05:25:18 UTC
And this setting uri_default also doesn't take effect

Comment 3 Erik Skultety 2016-07-29 07:34:59 UTC
(In reply to JinFangge from comment #1)
> And this setting uri_default also doesn't take effect

Well, this one was a different issue than the one being reported above. Therefore, the default URI setting issue is fixed upstream by:

commit f5f32bcd1bb7d96b38c34a85658ac0996683f8bc
Author:     Erik Skultety <eskultet>
AuthorDate: Wed Jul 27 13:23:03 2016 +0200
Commit:     Erik Skultety <eskultet>
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>

v2.1.0-rc1-14-gf5f32bc,

while the issue reported in #comment0 was fixed upstream by:

commit c5d0a2a38525929515337ea21cb5c19903ccb05c
Author:     Erik Skultety <eskultet>
AuthorDate: Tue Jul 26 14:06:13 2016 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Wed Jul 27 12:13:13 2016 +0200

    virconf: Fix config file path construction
    
    Since commit c4bdff19, the path to the configuration file has been constructed
    in the following manner:
     - if no config filename was passed to virConfLoadConfigPath, libvirt.conf was
     used as default
     - otherwise the filename was concatenated with
     "<config_dir>/libvirt/libvirt%s%s.conf" which in admin case resulted in
     "libvirt-libvirt-admin.conf.conf". Obviously, this non-existent config led to
     ignoring  all user settings in libvirt-admin.conf. This patch requires the
     config filename to be always provided as an argument with the concatenation
     being simplified.
    
     Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357364
    
    Signed-off-by: Erik Skultety <eskultet>

v2.0.0-265-gc5d0a2a

Comment 6 Yanqiu Zhang 2016-08-16 03:40:12 UTC
Reproduce this bug with libvirt-2.0.0-2.el7.x86_64
Steps to reproduce:
1.Set uri_aliases in libvirt-admin.conf:
# cd /etc/libvirt/
# vim libvirt-admin.conf
uri_aliases = [  "admin=libvirtd:///system",]

2.# systemctl restart libvirtd

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

4.Rename the config file to the wrong filename in argument format "libvirt%s%s.conf", reconnect.
# mv libvirt-admin.conf libvirt-libvirt-admin.conf.conf
# virt-admin -c admin
Welcome to virt-admin, the administrating virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virt-admin #


Verify this bug with libvirt-2.0.0-5.el7.x86_64
Steps to verify:
1.Set uri_aliases in libvirt-admin.conf:
# vim /etc/libvirt/libvirt-admin.conf
uri_aliases = [  "admin=libvirtd:///system",]

2.# systemctl restart libvirtd

3.# virt-admin -c admin
Welcome to virt-admin, the administrating virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virt-admin #
(Virt-admin connects to libvirtd:///system successfully)

4.If rename the config file to be "libvirt-libvirt-admin.conf.conf",  cannot connect successfully, which is as expected.

Since the results are as expected, mark this bug as verified.

Comment 8 errata-xmlrpc 2016-11-03 18:50:26 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/RHSA-2016-2577.html


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