[Pkg-libvirt-maintainers] Bug#667967: libvirt: does not parse connect URIs correctly
Zak B. Elep
zakame at zakame.net
Sat Apr 7 18:27:56 UTC 2012
Source: libvirt
Version: 0.9.11-1
Severity: important
Dear Maintainer,
I'm trying to manage a remote libvirt/KVM host over SSH, with a different
username than my current login fails. See following typescript:
Script started on Sunday, 08 April, 2012 02:06:30 AM PHT
zakame at carbon:~$ LIBVIRT_DEBUG=1 virsh -c qemu+ssh://xxx@yyy/system list
2012-04-07 18:06:49.961+0000: 6013: info : libvirt version: 0.9.11
2012-04-07 18:06:49.963+0000: 6013: debug : virConnectOpenAuth:1455 :
name=qemu+ssh://xxx@yyy/system, auth=0x7f75bc654680, flags=0
2012-04-07 18:06:49.964+0000: 6014: debug : virEventRunDefaultImpl:244 :
running default event implementation
2012-04-07 18:06:49.964+0000: 6014: debug :
virEventPollCleanupTimeouts:506 : Cleanup 0
2012-04-07 18:06:49.964+0000: 6014: debug :
virEventPollCleanupTimeouts:542 : Found 0 out of 0 timeout slots used,
releasing 0
2012-04-07 18:06:49.964+0000: 6014: debug :
virEventPollCleanupHandles:554 : Cleanup 1
2012-04-07 18:06:49.964+0000: 6014: debug : virEventPollMakePollFDs:383
: Prepare n=0 w=1, f=4 e=1 d=0
2012-04-07 18:06:49.964+0000: 6014: debug :
virEventPollCalculateTimeout:325 : Calculate expiry of 0 timers
2012-04-07 18:06:49.964+0000: 6014: debug :
virEventPollCalculateTimeout:351 : Timeout at 0 due in -1 ms
2012-04-07 18:06:49.965+0000: 6014: debug : virEventPollRunOnce:619 :
EVENT_POLL_RUN: nhandles=1 timeout=-1
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1182 : name
"qemu+ssh://xxx@yyy/system" to URI components:
scheme qemu+ssh
server yyy
user (null)
port 0
path /system
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
0 (Test) ...
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1232 : driver 0 Test
returned DECLINED
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
1 (Xen) ...
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1232 : driver 1 Xen
returned DECLINED
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
2 (OPENVZ) ...
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1232 : driver 2
OPENVZ returned DECLINED
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
3 (VMWARE) ...
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1232 : driver 3
VMWARE returned DECLINED
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
4 (VBOX) ...
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1232 : driver 4 VBOX
returned DECLINED
2012-04-07 18:06:49.965+0000: 6013: debug : do_open:1226 : trying driver
5 (remote) ...
2012-04-07 18:06:49.965+0000: 6013: debug : doRemoteOpen:542 :
proceeding with name = qemu:///system
2012-04-07 18:06:49.965+0000: 6013: debug : doRemoteOpen:552 :
Connecting with transport 2
2012-04-07 18:06:49.965+0000: 6013: debug : virCommandRunAsync:2174 :
About to run LC_ALL=C
PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
HOME=/home/zakame USER=zakame LOGNAME=zakame ssh yyy sh -c 'if 'nc' -q
2>&1 | grep "requires an argument" >/dev/null 2>&1; then ARG=-q0;else
ARG=;fi;'nc' $ARG -U /var/run/libvirt/libvirt-sock'
2012-04-07 18:06:49.966+0000: 6013: debug : virCommandRunAsync:2192 :
Command result 0, with PID 6015
zakame at yyy's password:
zakame at carbon:~$ exit
Script done on Sunday, 08 April, 2012 02:06:55 AM PHT
See that the connect URI was parsed incorrectly, ignoring the username `xxx'
completely, thus resulting in the suceeding ssh invocation to `ssh yyy
..', and
not `ssh xxx at yyy' or `ssh yyy -l xxx'.
This affects not only virsh, but other tools such as virt-install as well.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_PH.UTF-8, LC_CTYPE=en_PH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
More information about the Pkg-libvirt-maintainers
mailing list