Bug 1412673

Summary: drag-and-drop doesn't work for second and further sessions.
Product: Red Hat Enterprise Linux 6 Reporter: Andrei Stepanov <astepano>
Component: spice-vdagentAssignee: Pavel Grunt <pgrunt>
Status: CLOSED ERRATA QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9CC: astepano, cfergeau, dblechte, pgrunt, rbalakri, tlavigne, tpelka
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spice-vdagent-0.14.0-13.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 09:15:20 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: 1323630, 1323640    
Bug Blocks:    
Attachments:
Description Flags
spice-vdagent log
none
ovirt guest agent log
none
Log for ovirt guest agent. With DEBUG level. none

Description Andrei Stepanov 2017-01-12 14:27:19 UTC
Drag-and-drop for files from client to guest stops work for second session.

spice-vdagent-0.14.0-12.el6.x86_64
Client: RHEL7/Win7 (doesn't matter).

How reproducible: always.

Steps to Reproduce:
1. Have a RHEL 6.9.z guest VM.
2. Start the VM.
3. Connect to the VM with remote-viewer.
3. Test that D-n-D works well. Drop some file from client to guest.
4. Close remote-viewer.
5. Open a new session with remote-viewer to the same VM.
6. Drop some file from client to guest.

Result: D-n-D doesn't work any more.


The i686 version is not exposed to this bug.

Comment 1 Andrei Stepanov 2017-01-12 14:28:41 UTC
Created attachment 1239956 [details]
spice-vdagent log

Comment 2 Pavel Grunt 2017-01-12 14:53:55 UTC
Hi, the agent relies on console kit about getting the info about the locked session (to avoid copying when the machine is locked - bug 1323630)

Are there any modification related to locking the session?

Console kit is the same for x64 and i686 ? The agent code is not taking into account the arch.

Comment 3 Andrei Stepanov 2017-01-12 15:19:38 UTC
After installing ovirt-guest-agent I can reproduce the bug on i686 guest.

Comment 4 Pavel Grunt 2017-01-12 15:43:22 UTC
(In reply to Andrei Stepanov from comment #3)
> After installing ovirt-guest-agent I can reproduce the bug on i686 guest.

Does it have any logs ? Probably it is somehow locking the session & confusing our agent

Comment 5 Andrei Stepanov 2017-01-12 16:34:46 UTC
Created attachment 1240024 [details]
ovirt guest agent log

Comment 6 Pavel Grunt 2017-01-12 16:55:01 UTC
Andrei, did you make any modification related to session locking?

Comment 7 Andrei Stepanov 2017-01-13 09:36:29 UTC
Pavel Grunt:

1. I have installed completely new&fresh RHEL6.9(beta). Manually.
2. No additional steps were made. (User has password).
3. Install ovirt-guest-agent. Reboot VM.

After above steps the bug is reproducible.

Comment 10 Pavel Grunt 2017-01-13 14:54:18 UTC
Can you please get DEBUG level for the ovirt agent logs - I can see only "lock" session/screen events there and no unlock. That may explain why spice agent things that:

Jan 12 14:25:02.626900 spice-vdagentd: debug: (console-kit) session is locked: yes
Jan 12 14:25:02.626924 spice-vdagentd: debug: Session is locked, skipping file-xfer-start
Jan 12 14:25:02.626925 spice-vdagentd: warning: User's session is locked and cannot start file transfer. Cancelling client file-xfer request 2

Comment 11 Andrei Stepanov 2017-01-13 15:56:14 UTC
Created attachment 1240379 [details]
Log for ovirt guest agent. With DEBUG level.

Next log was received with next modification to:
/usr/share/ovirt-guest-agent/ovirt-guest-agent.py

L134:
     agent = OVirtAgentDaemon()
   + logging.getLogger().setLevel(logging.DEBUG)
     agent.run(daemon, pidfile)

Comment 12 Andrei Stepanov 2017-01-16 11:39:38 UTC
This bug is NOT reproducible on: Windows 7 64bit guest system with up&running:

spice-vdagent + OVirtGuestService

from:

# rpm -qf /usr/share/rhev-guest-tools-iso/RHEV-toolsSetup_4.1_3.iso --changelog | head
* Thu Dec 22 2016 Lev Veyde <lveyde> 4.1-3
- Updates:  rhev-agent-msi-4.41-1 rhev-balloon-msi-4.41-1 rhev-vioscsi-msi-4.41-1
            rhev-block-msi-4.41-1 rhev-network-msi-4.41-1 rhev-serial-msi-4.41-1
            rhev-spice-agent-msi-4.41-1 rhev-spice-guest-msi-4.41-1 rhev-sso-msi-4.41-1
            rhev-rng-msi-4.41-1 qemu-ga-msi-4.41-1 rhev-apt-4.41-1
- Based on: rhev-agent-binaries-4.41-1 virtio-win-1.9.0-3.el7 vdagent-win-4.1-1
            qxl-win-0.1-24 qemu-ga-win-7.3.2-1

Comment 13 Andrei Stepanov 2017-01-16 12:57:59 UTC
This bug is NOT reproducible on: current RHEL 7 guest system with up&running:

spice-vdagent-0.14.0-14.el7.x86_64
ovirt-guest-agent-common-1.0.13-2.el7ev.noarch

Comment 19 errata-xmlrpc 2017-03-21 09:15:20 UTC
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-2017-0586.html