Bug 1406271

Summary: [virtio-win][qemu-ga-win] if guest is auto-released after 10s, the following "guest-fsfreeze-freeze" and "guest-fsfreeze-thaw" should not prompt error.
Product: Red Hat Enterprise Linux 7 Reporter: xiagao
Component: virtio-winAssignee: Yvugenfi <yvugenfi>
virtio-win sub component: qemu-ga-win QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: ailan, lijin, lmiksik, michen, phou, wyu, xiagao, yvugenfi
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1470468 (view as bug list) Environment:
Last Closed: 2017-08-01 12:55:38 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:    
Bug Blocks: 1470468    

Description xiagao 2016-12-20 07:47:39 UTC
Description of problem:
if guest is auto-released after 10s, "guest-fsfreeze-freeze" and "guest-fsfreeze-thaw" should not prompt error.


qemu-ga-win version: qemu-ga-win-7.3.2-1

Version-Release number of selected component (if applicable):
kernel-3.10.0-495.el7.x86_64
qemu-img-rhev-2.6.0-27.el7.x86_64
virtio-win-1.9.0-3.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Boot up a windows guest.

2. Install virtio serial driver and windows guest agent installer.

3. Send some commands to guest agent:
  { "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}

==> It works.

4.
1)Freeze guest filesystem.
   {"execute":"guest-fsfreeze-freeze"}
   {"return": 2}
   {"execute":"guest-fsfreeze-status"}        
   {"return": "frozen"}

2)after >10s, the guest is auto-released, so freeze again
   {"execute":"guest-fsfreeze-freeze"}
   {"error": {"desc": "The command guest-fsfreeze-freeze has been disabled for this instance"}} 
   {"execute":"guest-fsfreeze-status"}        
   {"return": "frozen"}
==> the status is frozen

3)then, thaw guest
   {"execute":"guest-fsfreeze-thaw"}
   {"error": {"desc": "couldn't hold writes: fsfreeze is limited up to 10 seconds:  (error: 8004230f)"}}
   {"execute":"guest-fsfreeze-thaw"}
   {"return": 0}

   {"execute":"guest-fsfreeze-status"}  
   {"return": "thawed"}

Actual results:
after the guest is auto-released, execute "guest-fsfreeze-freeze" and "guest-fsfreeze-thaw" cmd will prompt errors which is confused by users.

Expected results:
after 2), if guest is auto-released, run "guest-fsfreeze-freeze" should not prompt error
after 3), if guest is auto-released, run "guest-fsfreeze-thaw" should not prompt error, it should return {"return": 0}


Additional info:
/usr/libexec/qemu-kvm -S -name avocado-vt-vm1 -nodefaults -vga std -m 3G -smp 4 -usb -device usb-tablet -drive file=50fee0e6-9b31-4dd0-bd33-6ce8e0a3ef77,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=0 -vnc :8 -rtc base=localtime,clock=host,driftfix=slew -boot order=cd,menu=on -enable-kvm -monitor stdio -qmp tcp:0:1238,server,nowait -netdev tap,id=hostnet0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:4a:16:01:56,bus=pci.0,addr=0x3 -drive file=/usr/share/virtio-win/virtio-win-1.9.0.iso,if=none,readonly=on,media=cdrom,format=raw,id=cdrom2 -device ide-drive,drive=cdrom2,bus=ide.1,unit=0,id=ide-cd2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x7 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,bus=virtio-serial0.0,chardev=qga0,name=org.qemu.guest_agent.0

Comment 4 xiagao 2017-04-10 02:58:42 UTC
Hi Yan,
I tested in qemu-ga-win-7.4.3-1 and qemu-kvm-rhev-2.8.0-6.el7.x86_64.

Steps:
1. Boot up a windows guest.

2. Install virtio serial driver and windows guest agent installer.

3. Send some commands to guest agent:
  { "execute": "guest-sync-delimited", "arguments": { "id": 123456 } }
�{"return": 123456}

==> It works.

4.
1)Freeze guest filesystem.
   {"execute":"guest-fsfreeze-freeze"}
   {"return": 2}
   {"execute":"guest-fsfreeze-status"}        
   {"return": "frozen"}

2)after >10s, the guest is auto-released, so freeze again
   {"execute":"guest-fsfreeze-freeze"}
   {"error": {"desc": "The command guest-fsfreeze-freeze has been disabled for this instance"}} 
   {"execute":"guest-fsfreeze-status"}        
   {"return": "frozen"}
==> the status is frozen

3)then, thaw guest
   {"execute":"guest-fsfreeze-thaw"}
   {"return": 2}

   {"execute":"guest-fsfreeze-status"}  
   {"return": "thawed"}


The result is like rhel guest.

Hi yan,
I have a question, why the status is not "thraw" in step2 since the guest is auto-released after >10s ? I think when the guest is auto-released,executing {"execute":"guest-fsfreeze-freeze"} will not prompt error info.
Be free to correct me,thanks.

xiagao

Comment 5 Yvugenfi@redhat.com 2017-04-12 08:59:01 UTC
There was a discussion for this upstream and was decided to leave it frozen as there was no user command that instructed to thaw.

http://lists.nongnu.org/archive/html/qemu-devel/2017-03/msg04210.html

Comment 6 lijin 2017-05-02 09:14:00 UTC
change status to verified according to comment#4 and comment#5

Comment 9 errata-xmlrpc 2017-08-01 12:55:38 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://access.redhat.com/errata/RHBA-2017:2341