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 999292 - conflict exist in man doc about '--attach'
Summary: conflict exist in man doc about '--attach'
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Daniel Berrangé
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 999914 999922
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-21 06:00 UTC by CongDong
Modified: 2015-05-11 22:16 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 999291
Environment:
Last Closed: 2013-09-09 08:41:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The virt-viewer log file (5.48 KB, text/x-log)
2013-08-23 00:07 UTC, CongDong
no flags Details

Description CongDong 2013-08-21 06:00:50 UTC
+++ This bug was initially created as a clone of Bug #999291 +++

Can reproduce this on RHEL6.5 with:
# rpm -qa libvirt virt-viewerlibvirt-0.10.2-22.el6.x86_64
virt-viewer-0.5.6-7.el6.x86_64
So clone the bug.


Description of problem:
Parameter "--attach", the results are the same whether I add it or not.
And the man page makes me confused.

Version-Release number of selected component (if applicable):
# rpm -qa libvirt virt-viewer
virt-viewer-0.5.7-1.el7.x86_64
libvirt-1.1.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Check the man page : # man virt-viewer
2. Prepare a server with a running guest, configure tcp for libvirt authentication
  Server :
  1)add configurations  in /etc/libvirt/libvirtd.conf

  listen_tls = 0
  listen_tcp = 1
  auth_tcp = "sasl"

  2) add sasl user
  # saslpasswd2 -a libvirt test
  (input your passwd)
  # sasldblistusers2 -f /etc/libvirt/passwd.db
  test.nay.redhat.com: userPassword

  3) uncomment LIBVIRTD_ARGS="--listen" in /etc/sysconfig/libvirtd
  
  4) restart libvirtd


3. On client:
# virt-viewer -a -c qemu+tcp://$ip/system $vm
# virt-viewer -c qemu+tcp://$ip/system $vm

Actual results:
1. -a, --attach
           Use libvirt to directly attach to a local display, instead of making a TCP/UNIX socket
           connection. This avoids the need to authentication with the remote display, if
           authentication with libvirt is already allowed.  This option does not work with remote
           displays.
   As the man pange says: This option does not work with remote displays.
   But if the option can only be used to the local guest, I think it's same with "virt-viewer $vm".
   And it's better to add an example here.

3. The results of two commands are same. An authentication required dialog will popup.

Expected results:
1. The man page should be understand more easily.
2. virt-viewer can connect the guest directly with option '-a'. The authentication required dialog shouldn't popup

Additional info:

Comment 2 Daniel Berrangé 2013-08-21 14:15:45 UTC
(In reply to CongDong from comment #0)
 
> 3. On client:
> # virt-viewer -a -c qemu+tcp://$ip/system $vm


Per the manpage --attach only works when using a local connection. ie you must be using  qemu:///system or qemu:///session.  Any use of +tcp or +tls or +ssh APIs will not work

Comment 3 CongDong 2013-08-22 07:04:46 UTC
(In reply to Daniel Berrange from comment #2)
> (In reply to CongDong from comment #0)
> Per the manpage --attach only works when using a local connection. ie you
> must be using  qemu:///system or qemu:///session.  Any use of +tcp or +tls
> or +ssh APIs will not work

Hi, thanks for reply, but still have two problems:

1. I tried with local connection and remote guest both.
virt-viewer -a -c qemu+tcp://$localip/system $vm
virt-viewer -c qemu+tcp://$localip/system $vm
Both of the two commands have same effect
virt-viewer -a $guest
virt-viewer $guest
Both of the two commands have same effect too.

As the result, I think the option is unless, so can you give me an example? I think should add one in man doc too.


2. In the manpage about "--attach":
 1) This avoids the need to authentication with the remote display, if authentication with libvirt is already allowed.
 2) This option does not work with remote displays.

 From the description in "1)", I think virt-viewer can connect the remote guest without authentication through "-a".
But as the "2)" says, it can't be used with remote displays.
It's conflict.

Comment 4 Daniel Berrangé 2013-08-22 10:24:28 UTC
Can you run

  LIBVIRT_LOG_FILTERS=1:libvirt virt-viewer -c qemu:///system --attach --debug $guest

and attach the output to this bug.

Comment 5 Daniel Berrangé 2013-08-22 11:27:16 UTC
I expect when you run that command you'll see an error in the logs

(virt-viewer:11573): virt-viewer-DEBUG: Error internal error: unable to execute QEMU command 'getfd': No file descriptor supplied via SCM_RIGHTS


And if you do  'setenforce 0', then the error will go away & virt-viewer will do what it is supposed to do.

Comment 6 CongDong 2013-08-23 00:07:55 UTC
Created attachment 789402 [details]
The virt-viewer log file

(In reply to Daniel Berrange from comment #5)
> I expect when you run that command you'll see an error in the logs
> 
> (virt-viewer:11573): virt-viewer-DEBUG: Error internal error: unable to
> execute QEMU command 'getfd': No file descriptor supplied via SCM_RIGHTS
> 
> 
> And if you do  'setenforce 0', then the error will go away & virt-viewer
> will do what it is supposed to do.

Yes, I run the command and there is an error message like you said in the log file, and I run it again after "steenforce 0", the error message didn't appear.
But virt-viewer can always connect the guest just like without "--attach".

Comment 7 Daniel Berrangé 2013-09-09 08:41:53 UTC
The KVM in RHEL-6 does not provide the functionality required for the --attach argument to work.

Comment 8 CongDong 2013-09-10 06:14:40 UTC
(In reply to Daniel Berrange from comment #7)
> The KVM in RHEL-6 does not provide the functionality required for the
> --attach argument to work.

If kvm in RHEL6 does not provide the function, I think should remove the options in virt-viewer.


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