Bug 1255584 - The default path of 'fsfreeze-hook' didnot exist for rhel6 guest
The default path of 'fsfreeze-hook' didnot exist for rhel6 guest
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.7
All Unspecified
unspecified Severity unspecified
: rc
: 6.7
Assigned To: Marc-Andre Lureau
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-20 23:28 EDT by Shuang Yu
Modified: 2015-11-25 11:19 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-25 11:19:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Shuang Yu 2015-08-20 23:28:32 EDT
Description of problem:
In the rhel6 guest,the default path for script 'fsfreeze-hook' is '/etc/qemu/fsfreeze-hook' doesn't exist in the guest.

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

x86_64 host:
kernel-3.10.0-302.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64

rhel6 guest on the x86_64 host:
kernel-2.6.32-540.el6.x86_64
qemu-guest-agent-0.12.1.2-2.480.el6.x86_64

rhel7 guest on the x86_64 host:
kernel-3.10.0-229.el7.x86_64
qemu-guest-agent-2.3.0-2.el7.x86_64


How reproducible:
100%

Steps to Reproduce:

1.Boot the guest with virtio serial:

/usr/libexec/qemu-kvm ....-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,id=qemu-ga0,name=org.qemu.guest_agent.0...

2.In the guest, install guest agent

3.In the guest, start qemu-guest-agent service
# service qemu-ga start--rhel6 guest
# service qemu-guest-agent status --rhel7 guest

4.# qemu-ga --help
 
5.# rpm -ql qemu-guest-agent

6.in the host:
# nc -U /tmp/qga.sock


Actual results:

For rhel6 guest:
After step4:
# qemu-ga --help
 -F, --fsfreeze-hook
                    enable fsfreeze hook. Accepts an optional argument that
                    specifies script to run on freeze/thaw. Script will be
                    called with 'freeze'/'thaw' arguments accordingly.
                    (default is /etc/qemu/fsfreeze-hook)
                    If using -F with an argument, do not follow -F with a
                    space.
                    (for example: -F/var/run/fsfreezehook.sh)
After step5:
# 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

For rhel7 guest:
After step4:
# qemu-ga --help
-F, --fsfreeze-hook
                    enable fsfreeze hook. Accepts an optional argument that
                    specifies script to run on freeze/thaw. Script will be
                    called with 'freeze'/'thaw' arguments accordingly.
                    (default is /etc/qemu-ga/fsfreeze-hook)
                    If using -F with an argument, do not follow -F with a
                    space.
                    (for example: -F/var/run/fsfreezehook.sh)
After step5:
# rpm -ql qemu-guest-agent
/etc/qemu-ga
/etc/qemu-ga/fsfreeze-hook
/etc/qemu-ga/fsfreeze-hook.d
/etc/sysconfig/qemu-ga
/usr/bin/qemu-ga
/usr/lib/systemd/system/qemu-guest-agent.service
/usr/lib/udev/rules.d/99-qemu-guest-agent.rules
/usr/share/doc/qemu-guest-agent-2.3.0
/usr/share/doc/qemu-guest-agent-2.3.0/COPYING
/usr/share/doc/qemu-guest-agent-2.3.0/README
/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

After step6,Both rhel6 and rhel7 guest can freeze and thaw with the command.

Expected results:
For rhel6 guest,after the step4 the default path of"fsfreeze-hook" should in the output of cmd "rpm -ql" in the step5

Additional info:
Comment 2 Shuang Yu 2015-08-21 01:27:49 EDT
Test this issue on the PowerPC host:

PowerPC host:
kernel-3.10.0-305.el7.ppc64le
qemu-kvm-rhev-2.3.0-18.el7.ppc64le

rhel6.7 guest:
kernel-2.6.32-573.el6.ppc64
qemu-guest-agent-0.12.1.2-2.480.el6.ppc64

rhel7 guest:
kernel-3.10.0-302.el7.ppc64
qemu-guest-agent-2.3.0-2.el7.ppc64

1.Boot the guest with virtio serial:

/usr/libexec/qemu-kvm ....-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,id=qemu-ga0,name=org.qemu.guest_agent.0...

2.In the guest, install guest agent

3.In the guest, start qemu-guest-agent service
# service qemu-ga start--rhel6 guest
# service qemu-guest-agent status --rhel7 guest

4.# qemu-ga --help
 
5.# rpm -ql qemu-guest-agent

6.in the host:
# nc -U /tmp/qga.sock

Actual results:

For rhel6 guest:
After step4:
# qemu-ga --help
  -F, --fsfreeze-hook
                    enable fsfreeze hook. Accepts an optional argument that
                    specifies script to run on freeze/thaw. Script will be
                    called with 'freeze'/'thaw' arguments accordingly.
                    (default is /etc/qemu/fsfreeze-hook)
                    If using -F with an argument, do not follow -F with a
                    space.

After step5:
# 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

For rhel7 guest:
After step4:
# qemu-ga --help
-F, --fsfreeze-hook
                    enable fsfreeze hook. Accepts an optional argument that
                    specifies script to run on freeze/thaw. Script will be
                    called with 'freeze'/'thaw' arguments accordingly.
                    (default is /etc/qemu-ga/fsfreeze-hook)
                    If using -F with an argument, do not follow -F with a
                    space.
                    (for example: -F/var/run/fsfreezehook.sh)
After step5:
# rpm -ql qemu-guest-agent
/etc/qemu-ga
/etc/qemu-ga/fsfreeze-hook
/etc/qemu-ga/fsfreeze-hook.d
/etc/sysconfig/qemu-ga
/usr/bin/qemu-ga
/usr/lib/systemd/system/qemu-guest-agent.service
/usr/lib/udev/rules.d/99-qemu-guest-agent.rules
/usr/share/doc/qemu-guest-agent-2.3.0
/usr/share/doc/qemu-guest-agent-2.3.0/COPYING
/usr/share/doc/qemu-guest-agent-2.3.0/README
/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

After step6,Both rhel6 and rhel7 guest can freeze and thaw with the command.

Expected results:
For rhel6 guest,after the step4 the default path of"fsfreeze-hook" should in the output of cmd "rpm -ql" in the step5
Comment 3 Marc-Andre Lureau 2015-11-25 11:19:51 EST
(In reply to Shuang Yu from comment #2)
> Expected results:
> For rhel6 guest,after the step4 the default path of"fsfreeze-hook" should in
> the output of cmd "rpm -ql" in the step5

qemu-ga service in rhel6 is not configured to use the default path:

/etc/sysconfig/qemu-ga:
FSFREEZE_HOOK_ENABLE=0
FSFREEZE_HOOK_PATHNAME=/usr/libexec/qemu-ga/fsfreeze-hook

However, if you start qemu-ga manually, it will use the default path.

Closing as notabug

Note You need to log in before you can comment on or make changes to this bug.