Bug 1213233
| Summary: | [virtagent] The default path '/etc/qemu/fsfreeze-hook' for 'fsfreeze-hook' script doesn't exist | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Gu Nini <ngu> |
| Component: | qemu-kvm | Assignee: | Miroslav Rezanina <mrezanin> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.7 | CC: | areis, chayang, hhuang, juzhang, michen, mkenneth, mrezanin, pbonzini, qzhang, rbalakri, rpacheco, virt-bugs, virt-maint, weliao, xuhan, ypu, zhengtli, zhguo |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-0.12.1.2-2.488.el6 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1210707 | Environment: | |
| Last Closed: | 2016-05-10 20:58:02 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: | 1210707 | ||
| Bug Blocks: | |||
Change the hardware based on above comment. The init script correctly set the -F path to the fsfreeze-hook script, so this bug is only happening when startin qemu-ga manually.
I can confirm this, and the problem is related to qemu-ga configure having qemu-kvm confsuffix. This solves the issue for me:
--- a/redhat/qemu-guest-agent.spec.template
+++ b/redhat/qemu-guest-agent.spec.template
@@ -263,7 +263,7 @@ cp %{SOURCE4} build_configure.sh
"%{_sysconfdir}" \
"%{_localstatedir}" \
"%{_libexecdir}" \
- "%{pkgname}" \
+ "/qemu-ga" \
I think this is quite low severity, so reassigning to Miroslav for the handling of build fix in future releases.
The path in 7.0 was /etc/qemu/fsfreeze-hook, so it should remain /etc/qemu/fsfreeze-hook in 7.2. Thus the patch in comment 4 seems incorrect to me. (In reply to Paolo Bonzini from comment #5) > The path in 7.0 was /etc/qemu/fsfreeze-hook, so it should remain > /etc/qemu/fsfreeze-hook in 7.2. Thus the patch in comment 4 seems incorrect > to me. Patch were /etc/qemu-ga/fsfreeze-hook in 7.0 (see https://brewweb.devel.redhat.com/rpminfo?rpmID=3303287). Anyway..we are changing default location used by qemu-ga not location of fsfreeze-hook location. Sorry, I thought I had 7.0 installed but it's actually 7.1. You're right. Fix included in qemu-kvm-0.12.1.2-2.485.el6 Test this bug using the following version:
Host:
2.6.32-607.el6.x86_64
qemu-kvm-0.12.1.2-2.485.el6.x86_64
Guest:
2.6.32-595.el6.x86_64
qemu-guest-agent-0.12.1.2-2.485.el6.x86_64
Test Steps:
1. Start a guest with virtio serial guest agent
/usr/libexec/qemu-kvm -name rhel6.8 -machine pc -drive id=drive_image1,if=none,cache=none,snapshot=off,format=qcow2,file=/mnt/RHEL-Server-6.7-64-virtio.qcow2 -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,bootindex=0 -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=52:54:25:93:79:67,id=net0 -m 2048 -smp 4,maxcpus=8,cores=4,threads=1,sockets=1 -cpu SandyBridge -boot menu=on -enable-kvm -qmp tcp:0:5556,nowait,server -monitor stdio -spice port=5901,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
2. In the guest, install qemu-guest-agent and set 'FSFREEZE_HOOK_ENABLE=1' in file '/etc/sysconfig/qemu-ga' for the rhel6.7 guest
3. In the guest, start the guest agent with following cmd:
# qemu-ga --method virtio-serial --path /dev/virtio-
4. In the guest, list help info of qemu-ga
# qemu-ga --help
.....default is /etc/qemu/fsfreeze-hook
5. In the guest, check the files of qemu-guest-agent package:
# rpm -ql qemu-guest-agent
/etc/rc.d/init.d/qemu-ga
/etc/sysconfig/qemu-ga
/usr/bin/qemu-ga
/usr/libexec/qemu-ga
/usr/libexec/qemu-ga/fsfreeze-hook
/usr/libexec/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d/mysql-flush.sh.sample
/var/log/qemu-ga
6.In the guest,"guest-fsfreeze-freeze can't execute success.
{"execute":"guest-fsfreeze-freeze"}
{"error": {"class": "GenericError", "desc": "can't access fsfreeze hook '/etc/qemu/fsfreeze-hook': No such file or directory", "data": {"message": "can't access fsfreeze hook '/etc/qemu/fsfreeze-hook': No such file or directory"}}}
So this bug didn't fixed. and retest qemu-guest-agent-0.12.1.2-2.486.el6.x86_64, also has this issue. reassign this bug.
Verify this bug with following version:
Host:
2.6.32-610.el6.x86_64
qemu-kvm-0.12.1.2-2.488.el6.x86_64
Guest:
2.6.32-595.el6.x86_64
qemu-guest-agent-0.12.1.2-2.488.el6.x86_64
Test Steps:
1. Start a guest with virtio serial guest agent
/usr/libexec/qemu-kvm -name rhel6.8 -machine pc -drive id=drive_image1,if=none,cache=none,snapshot=off,format=qcow2,file=/mnt/RHEL-Server-6.7-64-virtio.qcow2 -device virtio-blk-pci,id=image1,drive=drive_image1,bus=pci.0,bootindex=0 -netdev tap,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,mac=52:54:25:93:79:67,id=net0 -m 2048 -smp 4,maxcpus=8,cores=4,threads=1,sockets=1 -cpu SandyBridge -boot menu=on -enable-kvm -qmp tcp:0:5556,nowait,server -monitor stdio -spice port=5901,disable-ticketing -global qxl-vga.vram_size=67108864 -vga qxl -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0
2. In the guest, install qemu-guest-agent and set 'FSFREEZE_HOOK_ENABLE=1' in file '/etc/sysconfig/qemu-ga' for the rhel6.7 guest
3. In the guest, start the guest agent with following cmd:
# qemu-ga --method virtio-serial --path /dev/virtio-ports/org.qemu.guest_agent.0 -F
4. In the guest, list help info of qemu-ga
# qemu-ga --help
.....default is /usr/libexec/qemu-ga/fsfreeze-hook
5. In the guest, check the files of qemu-guest-agent package:
#rpm -ql qemu-guest-agent
/etc/rc.d/init.d/qemu-ga
/etc/sysconfig/qemu-ga
/usr/bin/qemu-ga
/usr/libexec/qemu-ga
/usr/libexec/qemu-ga/fsfreeze-hook
/usr/libexec/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d/mysql-flush.sh.sample
/var/log/qemu-ga
6.In the guest,"guest-fsfreeze-freeze can't execute success.
# nc -U /tmp/qga.sock
{"execute":"guest-fsfreeze-freeze"}
{"return": 2}
{"execute":"guest-fsfreeze-thaw"}
{"return": 2}
So this bug fixed on version qemu-kvm-0.12.1.2-2.488.el6
Verify this bug with following version:
Host:
2.6.32-633.el6.x86_64
qemu-kvm-0.12.1.2-2.490.el6.x86_64
Guest:
2.6.32-633.el6.x86_64
qemu-guest-agent-0.12.1.2-2.490.el6.x86_64
Test Steps:
1. Start a guest with virtio serial guest agent
/usr/libexec/qemu-kvm -name rhel -m 2048 -machine pc,accel=kvm -cpu SandyBridge -smp 2,cores=1,threads=1,sockets=1,maxcpus=4 -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -qmp tcp:0:5555,nowait,server -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -drive file=/home/images/80g.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -vga qxl -monitor stdio -spice port=3001,disable-ticketing -netdev tap,id=idinWyYp,vhost=on -device virtio-net-pci,mac=42:ce:a9:d2:4d:d7,id=idlbq7eA,netdev=idinWyYp
2. In the guest, install qemu-guest-agent and set 'FSFREEZE_HOOK_ENABLE=1' in file '/etc/sysconfig/qemu-ga' for the rhel6.7 guest
3. In the guest, start the guest agent with following cmd:
# qemu-ga --method virtio-serial --path /dev/virtio-ports/org.qemu.guest_agent.0 -F
4. In the guest, list help info of qemu-ga
# qemu-ga --help
.....default is /usr/libexec/qemu-ga/fsfreeze-hook
5. In the guest, check the files of qemu-guest-agent package:
#rpm -ql qemu-guest-agent
/etc/rc.d/init.d/qemu-ga
/etc/sysconfig/qemu-ga
/usr/bin/qemu-ga
/usr/libexec/qemu-ga
/usr/libexec/qemu-ga/fsfreeze-hook
/usr/libexec/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d
/usr/share/qemu-kvm/qemu-ga/fsfreeze-hook.d/mysql-flush.sh.sample
/var/log/qemu-ga
6.In the guest,"guest-fsfreeze-freeze" be executed successfully.
# nc -U /tmp/qga.sock
{"execute":"guest-fsfreeze-freeze"}
{"return": 3}
{"execute":"guest-fsfreeze-thaw"}
{"return": 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. https://rhn.redhat.com/errata/RHBA-2016-0815.html |
host kernel: 2.6.32-555.el6.x86_64 host qemu: qemu-kvm-0.12.1.2-2.466.el6.x86_64 guest kernel: 2.6.32-555.el6.x86_64 guest agent: qemu-guest-agent-0.12.1.2-2.466.el6.x86_64 QE retested this bug on the above environment,then got the same result. So, the bug is reproduced on the above environment.