Bug 999323

Summary: virsh ignores --connect switch
Product: Red Hat Enterprise Linux 7 Reporter: Gerd Hoffmann <kraxel>
Component: libvirtAssignee: Martin Kletzander <mkletzan>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: acathrow, ajia, dyuan, hliu, mkletzan, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.1-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 09:46:56 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:

Description Gerd Hoffmann 2013-08-21 07:30:39 UTC
Description of problem:
$subject

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

How reproducible:
100%

Steps to Reproduce:
1. virsh -c lxc:/// list --all

Actual results:
virsh connects to qemu:///system

Expected results:
virsh connects to lxc:///

Additional info:

nilsson kraxel ~# echo $VIRSH_DEFAULT_CONNECT_URI
qemu:///system

Comment 2 Martin Kletzander 2013-08-21 08:44:04 UTC
Broken by commit abfff210 (mine), vshInit needs to be split to two functions.

Comment 3 Martin Kletzander 2013-08-21 09:57:45 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2013-August/msg01023.html

Comment 4 Martin Kletzander 2013-08-22 07:57:24 UTC
Fixed upstream with commit v1.1.1-197-ga0b6a36:

commit a0b6a36f9456dae895f50d344fd2d38be1167c58
Author: Martin Kletzander <mkletzan>
Date:   Wed Aug 21 11:02:42 2013 +0200

    Fix URI connect precedence

Comment 6 Hao Liu 2013-09-02 06:37:09 UTC
Verified this fix.

Packages:
libvirt-client-1.1.1-3.el7.x86_64

Verify steps:
1. Set environment variable to qemu.
# export VIRSH_DEFAULT_CONNECT_URI=qemu:///system

2. Check connected URI.
# virsh -c lxc:/// uri

Result:
lxc:///

Comment 7 Ludek Smid 2014-06-13 09:46:56 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.