Bug 712938
Summary: | Can't connect to linux guest with WAN options | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Swapna Krishnan <skrishna> | ||||||||||
Component: | spice-client | Assignee: | Christophe Fergeau <cfergeau> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||||||
Severity: | low | Docs Contact: | |||||||||||
Priority: | unspecified | ||||||||||||
Version: | 6.2 | CC: | agilboa, alevy, cfergeau, cmeadors, dblechte, mkenneth, mkrcmari, uril | ||||||||||
Target Milestone: | rc | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | spice-client-0.8.2-1.el6 | Doc Type: | Bug Fix | ||||||||||
Doc Text: |
Cause
When WAN options are given to spice-client, and an agent is running on the guest, spice-client sends a VD_AGENT_DISPLAY_CONFIG to the agent, and wait for repl
y.
Spice vdagent running on a linux guest does not yes support WAN options, and does not reply on VD_AGENT_DISPLAY_CONFIG.
Consequence
When WAN options are given to a spice-client connected to a Linux guest, conne
ction fails with vdagent timeout.
Fix
When no agent is running on the guest, or if the agent does not support WAN op
tions (VD_AGENT_CAP_DISPLAY_CONFIG capability), spice-client does not wait for a
gent on the guest to reply, but continue with the initiating message sequence (sending SPICE_MSGC_MAIN_ATTACH_CHANNELS).
Result
When WAN options are given to a spice-client connected to a Linux guest, conn
ection succeeds.
See: Comment 3
|
Story Points: | --- | ||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2011-12-06 15:22:29 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: | |||||||||||||
Attachments: |
|
Description
Swapna Krishnan
2011-06-13 16:52:45 UTC
Forgot to mention this when I filed the bug. When spice-vdagentd is running on the linux guest and I try to connect with WAN features, I still get vdagent timeout message. Thanks, - Swapna I think I figured out what is going on. It all starts in RedClient::handle_init This function checks whether we have an agent or not, because if we have an agent, there will be some kind of handshake to check both sides capabilities before all the spice channels are created. When there is no agent running, the startup process goes on with SPICE_MSGC_MAIN_ATTACH_CHANNELS When there is a windows agent running, VD_AGENT_ANNOUNCE_CAPABILITIES and VD_AGENT_DISPLAY_CONFIG messages are sent to the agent, and when processing the agent answer to the VD_AGENT_DISPLAY_CONFIG message, SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent and the startup process will go on. However, when there is no agent running but --color-depth was used, handle_init won't send the SPICE_MSGC_MAIN_ATTACH_CHANNELS message but will wait for the agent handshake to proceed to its end, which won't happen, so it will timeout waiting for agent answers. Similarly, the linux agent handles VD_AGENT_ANNOUNCE_CAPABILITIES messages, but it doesn't handle VD_AGENT_DISPLAY_CONFIG messages, so we'll never reach the point where a SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent. I suggest 2 fixes: - unconditionnally send SPICE_MSGC_ATTACH_CHANNELS when no agent is running in handle_init - send SPICE_MSGC_MAIN_ATTACH_CHANNELS in RedClient::on_agent_announce_capabilities if the agent doesn't have the VD_AGENT_CAP_DISPLAY_CONFIG capability Created attachment 511509 [details]
Proposed patch (ChangeLog needs writing ;)
I committed the patch from comment #3 to spice git master Created attachment 513780 [details]
The initial patch was buggy, fixed version
Comment on attachment 513780 [details]
The initial patch was buggy, fixed version
Wrong bug
Created attachment 514226 [details]
this patch was needed on top of the previous one
First patch was buggy, this patch needs to be applied on top of it.
This is fixed in spice 0.8.2 which RHEL6.2 is being rebased to. Created attachment 515734 [details]
agent timeout patch
The (already pushed) patch from comment 11 caused the following regression: When client runs without the auto-conf or disable-effects options (either from CLI or controller), which is the case when using Spice from Admin Portal, the client will unecessarily wait for 30sec before connecting. The mentioned patch assumed that on_agent_reply() of VD_AGENT_DISPLAY_CONFIG will call send_main_attach_channels() and connect. However, when auto-conf or disable-effects are not used, on_agent_reply() will ignore the reply and not call send_main_attach_channels(). Therefore, send_main_attach_channels() will only be called on agent timeout. The solution (attachment 515734 [details] by Christophe) is to activate agent timer only if auto-conf or disable-effects. Otherwise, simply call send_main_attach_channels(). Opend BZ #726441 for this one. (In reply to comment #14) > When client runs without the auto-conf or disable-effects options (either from > CLI or controller), which is the case when using Spice from Admin Portal, the > client will unecessarily wait for 30sec before connecting. and when the guest is a windows guest with an agent running, this won't happen on linux, or when the agent is not running. Comment on attachment 515734 [details]
agent timeout patch
A fix for rhbz#726441 (introduced by a fix for this bug)
Verified on spice-client-0.8.2-2. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause When WAN options are given to spice-client, and an agent is running on the guest, spice-client sends a VD_AGENT_DISPLAY_CONFIG to the agent, and wait for repl y. Spice vdagent running on a linux guest does not yes support WAN options, and does not reply on VD_AGENT_DISPLAY_CONFIG. Consequence When WAN options are given to a spice-client connected to a Linux guest, conne ction fails with vdagent timeout. Fix When no agent is running on the guest, or if the agent does not support WAN op tions (VD_AGENT_CAP_DISPLAY_CONFIG capability), spice-client does not wait for a gent on the guest to reply, but continue with the initiating message sequence (sending SPICE_MSGC_MAIN_ATTACH_CHANNELS). Result When WAN options are given to a spice-client connected to a Linux guest, conn ection succeeds. See: Comment 3 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. http://rhn.redhat.com/errata/RHBA-2011-1518.html |