Bug 488945

Summary: virt-manager fails to create guest remotely via digest-md5 SASL
Product: [Fedora] Fedora Reporter: Alan Pevec <apevec>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 10CC: berrange, crobinso, hbrock, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-14 15:50:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Pevec 2009-03-06 12:05:14 UTC
Description of problem:
virt-manager fails to create guest remotely via digest-md5 SASL

Version-Release number of selected component (if applicable):
virt-manager-0.6.0-5.fc10.x86_64

How reproducible:
always

Steps to Reproduce:
1. configure remote libvirtd for digest-md5 SASL authentication:
 /etc/libvirt/libvirtd.conf 
listen_tls = 0
listen_tcp = 1
 /etc/sasl2/libvirt.conf 
sasldb_path: /etc/libvirt/passwd.db
mech_list: digest-md5
 saslpasswd2 -a libvirt user1
Password: 
Again (for verification): 
 service libvirtd restart

2. in virt-manager, Add Connection to QEMU, Remote Password or Kerberos
(i.e. qemu+tcp://remotehost/system )
3. user is prompted for remote SASL username/password and successfully connects,
   you can already defined remote VMs
4. go through create VM wizard, choose Network boot and pre-created disk image file to make it simple
  
Actual results:
[Fri, 06 Mar 2009 12:29:02 virt-manager 28585] DEBUG (create:714) Starting backg
round install process
[Fri, 06 Mar 2009 12:29:02 virt-manager 28585] DEBUG (create:718) Opening separa
te connection for the install.
[Fri, 06 Mar 2009 12:29:02 virt-manager 28585] ERROR (create:741) Unable to comp
lete install '<class 'libvirt.libvirtError'> Failed to start SASL negotiation: -
4 (SASL(-4): no mechanism available: No worthy mechs found)
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 719, in do_install
    guest.conn = libvirt.open(self.connection.get_uri())
  File "/usr/lib64/python2.5/site-packages/libvirt.py", line 160, in open
    if ret is None:raise libvirtError('virConnectOpen() failed')
libvirtError: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism avail
able: No worthy mechs found)


Expected results:
new remote VM is created

Additional info:
this issue exists in virt-manager--devel:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/file/35f1db8a045d/src/virtManager/create.py#l713

libvirt.open is used to open a separate libvirt connection for VM creation,
it should be libvirt.openAuth otherwise callbacks for entering SASL username/password are missing and SASL negotiation fails

Comment 1 Cole Robinson 2009-03-06 14:35:43 UTC
Thanks for the report. I had this as a FIXME in the 'New VM' wizard rewrite, so this will hopefully be in the new version (probably cut Monday).

Comment 2 Cole Robinson 2009-03-10 01:37:23 UTC
This should be fixed upstream now:

http://hg.et.redhat.com/cgi-bin/hg-virt.cgi/applications/virt-manager--devel/rev/5db5666451b7

Though this likely won't hit F10 for a while. I'll be pushing a new package to rawhide within a day, I'd appreciate it if you could give it a test at some point since I don't have a setup for it.

Comment 3 Alan Pevec 2009-03-10 12:00:44 UTC
Thanks! I'll rebuild rawhide virt-manager and python-virtinst for F10 and put them in ovirt.org yum repo.

Comment 4 Cole Robinson 2009-09-14 15:50:57 UTC
I think it's too late to be backporting a major virt-manager version to F10, so
moving this bug F11 (where it is fixed) and closing as CURRENTRELEASE.