Bug 999291
Summary: | Improve documentation of --attach command line option | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | CongDong <codong> | |
Component: | virt-viewer | Assignee: | Jonathon Jongsma <jjongsma> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.0 | CC: | berrange, cfergeau, codong, dblechte, dyuan, jjongsma, juzhou, marcandre.lureau, mzhan, rbalakri, tzheng | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | virt-viewer-0.6.0-2.el7 | Doc Type: | Bug Fix | |
Doc Text: |
The manpage documentation for the commandline --attach option was difficult to understand. This has been improved.
|
Story Points: | --- | |
Clone Of: | ||||
: | 999292 (view as bug list) | Environment: | ||
Last Closed: | 2015-03-05 13:37:46 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: | 999925, 999926 | |||
Bug Blocks: |
Description
CongDong
2013-08-21 05:56:53 UTC
(In reply to CongDong from comment #0) > > 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 Bug #999292 addresses 2), I'm retitling this bug to make it more explicit that it's about improving --attach documentation Daniel, you are probably best placed to write some doc about this option. 1) I don't know what it is, 2) I am not native english 3) you can just commit that upstream right away, you are maintainer :) fixed by rebase to 0.6.0 VERIFY with: virt-viewer-0.6.0-1.el7.x86_64 Steps are same with description. Result: step1, man page for option "attach" is not updated. Step3, The results of two commands are same. An authentication required dialog will popup. As the result, the problem is still there, so set ASSIGNED. Apparently this commit was not in 0.6.0 after all. I'll make a new build with this patch soon. Hi Jonathon Jongsma, when i try to verify this issue with package: virt-viewer-0.6.0-3.el7.x86_64 i met the following problems, please help have a look, thanks. 1. manpage check # man virt-viewer -a, --attach Instead of making a direct TCP/UNIX socket connection to the remote display, ask libvirt to provide a pre-connected socket for the display. This avoids the need to authenticate with the remote display server directly. This option will only work when connecting to a guest that is running on the same host as the virt-viewer program. If attaching to the guest via libvirt fails, virt-viewer will automatically fallback to trying a regular direct TCP/UNIX socket connection. I think string "fallback to trying" may has syntax error, should be "fallback to try". 2. function check for "-a" option Prepare a host with a running guest, configure tcp for libvirt authentication 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 5) As the manual page said:" This option will only work when connecting to a guest that is running on the same host as the virt-viewer program." # virt-viewer -a -c qemu+tcp://$ip/system $vm # virt-viewer -c qemu+tcp://$ip/system $vm The results of two commands are same. An authentication required dialog will popup. so please help check whether my step is right or not, if not, please give me some suggestion to verify it, thanks. (In reply to zhoujunqin from comment #12) > Hi Jonathon Jongsma, > when i try to verify this issue with package: > virt-viewer-0.6.0-3.el7.x86_64 > i met the following problems, please help have a look, thanks. > > 1. manpage check > # man virt-viewer > -a, --attach > Instead of making a direct TCP/UNIX socket connection to the > remote display, ask libvirt to > provide a pre-connected socket for the display. This avoids the > need to authenticate with > the remote display server directly. This option will only work > when connecting to a guest > that is running on the same host as the virt-viewer program. If > attaching to the guest via > libvirt fails, virt-viewer will automatically fallback to trying > a regular direct TCP/UNIX > socket connection. > > I think string "fallback to trying" may has syntax error, should be > "fallback to try". In this case, I think 'trying' is fine. > > 2. function check for "-a" option > Prepare a host with a running guest, configure tcp for libvirt > authentication > 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 > > 5) As the manual page said:" This option will only work when connecting to > a guest that is running on the same host as the virt-viewer program." > > # virt-viewer -a -c qemu+tcp://$ip/system $vm > # virt-viewer -c qemu+tcp://$ip/system $vm > > The results of two commands are same. An authentication required dialog will > popup. > > so please help check whether my step is right or not, if not, please give me > some suggestion to verify it, thanks. This bug is only about the documentation. So as long as the documentation issue is fixed, the bug should be closed. If the functionality itself does not work as expected, you should open a new bug. But the documentation suggests that it only works if virt-viewer and the guest are on the same system. Is $ip the local machine? Perhaps you should try with qemu:///system rather than qemu+tcp://$ip/system? I'm afraid that I don't have a lot of knowledge about this feature. > This bug is only about the documentation. So as long as the documentation
> issue is fixed, the bug should be closed. If the functionality itself does
> not work as expected, you should open a new bug.
Perhaps I wrote this too quickly. I guess the initial report was indeed about confusion with whether the feature actually worked or not, though the title was later changed to only mention the documentation. Daniel, would you be able to provide some steps for testing whether this feature actually works properly or not?
As result in comment 12 setp 1 and comment 13, the man page is already updated. So VERIFY this. Hi, Could you help to provide the steps for testing this feature? If it doesn't work, I will think about to file a new one. Tested with: virt-viewer-0.6.0-12.el7.x86_64 Test whether virt-viewer --attach works. 1.Test using qemu:///system. # virt-viewer demo -a For vnc guest,the screen is dark and "Connected to graphic server" shows. For spice guest,the screen is dark and "Connecting to graphic server" shows. If use virt-viewer demo,the guest console will be launched successfully. 2.Test using qemu+tcp://$ip/system. On localhost prepare with a running guest, configure tcp for libvirt authentication 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 # virt-viewer qemu+tcp://localhost/system demo -a # virt-viewer qemu+tcp://localhost/system demo The above command acts the same,both authtication box pop out and you need to input user/password to launch the console. Hi,Daniel Would you pls help check whether the above steps are right for testing --attach option,thanks very much. The attach flag does not do anything when you connect to libvirt over TCP. It only has effect when using a UNIX socket connection. (In reply to Daniel Berrange from comment #18) > The attach flag does not do anything when you connect to libvirt over TCP. > It only has effect when using a UNIX socket connection. If it only has effect with UNIX socket connection,why from virt-viewer manual,it says that affect TCP/UNIX socket connection. -a, --attach Instead of making a direct TCP/UNIX socket connection to the remote display, ask libvirt to provide a pre-connected socket for the display. I tried unix connnection by the below steps: 1. add auth_unix_rw="sasl" in the /etc/libvirt/libvirtd.conf 2.add sasl user # saslpasswd2 -a libvirt test (input your passwd) 3.Restart libvirtd server. # service libvirtd restart 4.Prepare a running guest. # virsh -c qemu+unix:///system list Please enter your authentication name: test Please enter your password: Id Name State ---------------------------------------------------- 2 demo running 5.Use virt-viewer to launch guest console. 5.1 # virt-viewer -c qemu+unix:///system demo -->No password needed,guest console will be launched successfully,and direct TCP connection shows in debug info. # virt-viewer -c qemu+unix:///system demo --debug (virt-viewer:26728): virt-viewer-DEBUG: Guest graphics address is 127.0.0.1:5900 (virt-viewer:26728): virt-viewer-DEBUG: Set connect info: localhost,127.0.0.1,5900,-1,unix,(null),(null),0 (virt-viewer:26728): virt-viewer-DEBUG: Error operation forbidden: read only access prevents virDomainOpenGraphics (virt-viewer:26728): virt-viewer-DEBUG: After open connection callback fd=-1 (virt-viewer:26728): virt-viewer-DEBUG: Opening direct TCP connection to display at 127.0.0.1:5900:-1 (virt-viewer:26728): virt-viewer-DEBUG: New spice channel 0xd90b60 SpiceMainChannel 0 5.2 # virt-viewer -c qemu+unix:///system demo -a -->authtication box pop out,after input the user/password,virt-viewer coredump. # virt-viewer -c qemu+unix:///system demo -a --debug ** (virt-viewer:26708): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-cRPYh0BqYC: Connection refused (virt-viewer:26708): virt-viewer-DEBUG: fullscreen display 0: 0 (virt-viewer:26708): virt-viewer-DEBUG: connecting ... (virt-viewer:26708): virt-viewer-DEBUG: Opening connection to libvirt with URI qemu+unix:///system (virt-viewer:26708): virt-viewer-DEBUG: Add handle 6 1 0x7bc6d0 (virt-viewer:26708): virt-viewer-DEBUG: Got libvirt credential request for 2 credential(s) (virt-viewer:26708): virt-viewer-DEBUG: Got 'test' 4 2 (virt-viewer:26708): virt-viewer-DEBUG: Got 'redhat' 6 5 (virt-viewer:26708): virt-viewer-DEBUG: Return 0 (virt-viewer:26708): virt-viewer-DEBUG: initial connect (virt-viewer:26708): virt-viewer-DEBUG: notebook show status 0x6c7180 (virt-viewer:26708): virt-viewer-DEBUG: virt_viewer_app_set_uuid_string: UUID changed to bf6d8713-b158-4bf2-beeb-eebb5cad1f89 (virt-viewer:26708): virt-viewer-DEBUG: No guest-specific fullscreen config, using fallback (virt-viewer:26708): virt-viewer-DEBUG: notebook show status 0x6c7180 (virt-viewer:26708): virt-viewer-DEBUG: Guest demo is running, determining display (virt-viewer:26708): virt-viewer-DEBUG: Set connect info: (null),(null),(null),-1,(null),(null),(null),0 (virt-viewer:26708): virt-viewer-DEBUG: Guest demo has a spice display (virt-viewer:26708): virt-viewer-DEBUG: Guest graphics address is 127.0.0.1:5900 (virt-viewer:26708): virt-viewer-DEBUG: Set connect info: localhost,127.0.0.1,5900,-1,unix,(null),(null),0 (virt-viewer:26708): virt-viewer-DEBUG: Remove handle 1 6 Segmentation fault (core dumped) (gdb) where #0 0x00007f4caaa2ea42 in virFileClose () from /lib64/libvirt.so.0 #1 0x00007f4caab67ff6 in virNetMessageFree () from /lib64/libvirt.so.0 #2 0x00007f4caab5e97a in virNetClientProgramCall () from /lib64/libvirt.so.0 #3 0x00007f4caab36482 in callFull.isra.2 () from /lib64/libvirt.so.0 #4 0x00007f4caab3945f in remoteDomainOpenGraphics () from /lib64/libvirt.so.0 #5 0x00007f4caab1ef84 in virDomainOpenGraphics () from /lib64/libvirt.so.0 #6 0x0000000000426d30 in virt_viewer_open_connection (self=<optimized out>, fd=0x7fffd7e3c5fc) at virt-viewer.c:497 #7 0x000000000041389c in virt_viewer_app_default_activate (self=0x15dd140, error=0x7fffd7e3c798) at virt-viewer-app.c:1142 #8 0x000000000041536b in virt_viewer_app_activate (self=0x15dd140, error=0x7fffd7e3c798) at virt-viewer-app.c:1209 #9 0x00000000004271d2 in virt_viewer_initial_connect (app=0x15dd140, error=0x7fffd7e3c798) at virt-viewer.c:635 #10 0x0000000000426a70 in virt_viewer_connect (app=app@entry=0x15dd140) at virt-viewer.c:796 #11 0x0000000000426c8d in virt_viewer_start (app=0x15dd140) at virt-viewer.c:834 #12 0x0000000000414116 in virt_viewer_app_start (self=0x15dd140) at virt-viewer-app.c:1700 #13 0x000000000040fbc4 in main (argc=1, argv=0x7fffd7e3caf8) at virt-viewer-main.c:113 (gdb) quit I think for UNIX socket connection,the --attach option didn't work well,would you pls help to check whether the above steps is right to test --attach option and need I file a new bug about it,thanks. For comment 19,file new bug 1196552. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0295.html |