Bug 831174

Summary: qemu-ga default statedir should be /run
Product: Red Hat Enterprise Linux 7 Reporter: Paolo Bonzini <pbonzini>
Component: qemu-kvmAssignee: Luiz Capitulino <lcapitulino>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: areis, flang, juzhang, knoel, lcapitulino, pbonzini
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu 1.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:12:28 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:

Description Paolo Bonzini 2012-06-12 12:03:20 UTC
Description of problem:
qemu-ga stores the fsfreeze state in /tmp.  For RHEL7, /run would be a better match.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Run "qemu-ga --help"
  
Actual results:
The default statedir is shown to be /tmp.

Expected results:
The default statedir is shown to be /run.

Additional info:
Upstream we should probably make the default changeable at configure-time, so that the RHEL7 patch would touch the spec file only.

Comment 1 Luiz Capitulino 2012-10-08 16:02:58 UTC
Patches posted upstream and have already been accepted by qemu-ga's maintainer:

https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg00476.html

Comment 2 Luiz Capitulino 2012-10-15 16:53:50 UTC
Merged upstream (commits 785c23ae5c and 6a3c8c14c). To test this, run latest qemu-ga in the guest, freeze the FS and do:

 # ls -la /var/run/ (or /usr/local/var/run)

And check if a file named qga.state.isfrozen has been created.

Comment 3 Paolo Bonzini 2012-10-25 13:51:00 UTC
*** Bug 836275 has been marked as a duplicate of this bug. ***

Comment 5 langfang 2014-01-26 03:38:44 UTC
Verify this bug as follow version:
Host:
# uname -r
3.10.0-79.el7.x86_64
# rpm -q qemu-kvm
qemu-kvm-1.5.3-41.el7.x86_64

Guest:RHEl7

qemu-guest-agent-1.5.3-41.el7.x86_64.rpm 

Steps:
1.# qemu-ga --help
...
  -t, --statedir    specify dir to store state information (absolute paths
                    only, default is /var/run)
...
2.on host
#nc -U /tmp/qga.sock
{"execute":"guest-fsfreeze-freeze" }
{"return": 2}
3. check state file
# ll /var/run/qga.state 
-rw-r--r--. 1 root root 25 Jan 25 22:33 /var/run/qga.state

Results:
After step 1:The Paths is /var/run
After step 3: A file named qga.state.isfrozen has been created.


According to above test ,this bug fixed.

Comment 7 Ludek Smid 2014-06-13 12:12:28 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.