Bug 844326

Summary: ocaml-libvirt needs to bind virConnectOpenAuth
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libvirt-ocamlAssignee: Libvirt Maintainers <libvirt-maint>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: berrange, cwei, fedora-ocaml-list, jwu, libvirt-maint, mjenner, mzhan, rjones, virt-maint, zpeng
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 844237
: 844327 (view as bug list) Environment:
Last Closed: 2016-12-20 12:16:54 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:
Bug Depends On: 844327    
Bug Blocks: 844237    

Description Richard W.M. Jones 2012-07-30 10:05:57 UTC
+++ This bug was initially created as a clone of Bug #844237 +++

Created attachment 601105 [details]
libvirtd's log with log_level=1

Description of problem:
  virt-top fail to connect through tcp connection with sasl authentication

Version-Release number of selected component (if applicable):
libvirt-0.9.10-21.el6_3.3.x86_64
virt-top-1.0.4-3.13.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Edit /etc/sysconfig/libvirtd uncomment LIBVIRTD_ARGS
LIBVIRTD_ARGS="--listen"

2.Edit  /etc/libvirt/libvirtd.conf
listen_tcp =1
auth_tcp = "sasl"

3.Add a user named "fred", and setting his password as "redhat"
# saslpasswd2 -a libvirt fred
Password: xxxxxx
Again (for verification): xxxxxx

4. #service libvirtd restart

5. #service iptables stop

6. virsh -c qemu+tcp://$ip/system

7. virt-top -c qemu+tcp://$ip/system --debug /tmp/virt-top-debug

Actual results:
1. Step 6 works well
2. Step 7 fails with following error:
--------------------------------------------------------------------------------------
libvir: RPC error : authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
libvirt: VIR_ERR_AUTH_FAILED: VIR_FROM_RPC: authentication failed: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
--------------------------------------------------------------------------------------

Expected results:
1. virt-top could work well.

Additional info:
1. After step 7, debug file wasn't created, so I cannot provide it. Only attach the libvirtd's log

--- Additional comment from rjones on 2012-07-30 03:29:38 EDT ---

To Dan:

Does SASL authentication need a connection call other than
virConnectOpen{,ReadOnly}?

If so then we'll need to duplicate this bug for ocaml-libvirt
and add that package to the Approved Components List.

--- Additional comment from berrange on 2012-07-30 03:56:16 EDT ---

Yes, you need to use virConnectOpenAuth() and provide an authentication callback to collect credentials. In the case of virt-top, since it is a CLI app, you can just pass "virConnectAuthDefault" to OpenAuth. For the OCaml API in general, you'd need to allow user specified callbacks.

Comment 1 Fedora End Of Life 2013-04-03 18:10:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 2 Fedora End Of Life 2015-01-09 17:17:19 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Jan Kurik 2015-07-15 15:04:54 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 4 Fedora End Of Life 2016-11-24 10:42:51 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Fedora End Of Life 2016-12-20 12:16:54 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Daniel Berrangé 2016-12-20 12:26:04 UTC
Re-opening and moving to upstream tracker