RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1160084 - domfsfreeze and domfsthaw cannot work well when guest restart
Summary: domfsfreeze and domfsthaw cannot work well when guest restart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-04 00:47 UTC by Luyao Huang
Modified: 2015-03-05 07:46 UTC (History)
7 users (show)

Fixed In Version: libvirt-1.2.8-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 07:46:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0323 0 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2015-03-05 12:10:54 UTC

Description Luyao Huang 2014-11-04 00:47:29 UTC
Description of problem:
domfsfreeze and domfsthaw cannot work well when guest restart

Version-Release number of selected component (if applicable):
libvirt-1.2.8-5.el7.x86_64
qemu-kvm-rhev-2.1.2-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.prepare a guest with agent
# virsh dumpxml test3
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/r6-7.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='8'/>
    </channel>

2.# virsh start test3
Domain test3 started

3.# virsh domfsfreeze test3
Froze 1 filesystem(s)

4.restart guest
# virsh destroy test3
Domain test3 destroyed

# virsh start test3
Domain test3 started

5.guest will cannot be used domfsfreeze
# virsh domfsfreeze test3
error: Unable to freeze filesystems
error: Requested operation is not valid: domain is already quiesced

6.use domfsthaw
# virsh domfsthaw test3
Thawed 0 filesystem(s)

7.guest's fs can be froze again
# virsh domfsfreeze test3
Froze 1 filesystem(s)

Actual results:

guest's fs cannot be Froze after destroy and restart it.

Expected results:

After restart guest we can use domfsfreeze normal

Additional info:

Also found issue when use command reset migrate

Comment 1 Michal Privoznik 2014-11-04 14:44:57 UTC
Patch proposed upstream:

https://www.redhat.com/archives/libvir-list/2014-November/msg00022.html

Comment 4 Luyao Huang 2014-11-27 01:06:24 UTC
During verify this bug, i found domfsfreeze cannot work well with save, managedsasve, migrate.


1.# virsh domfsfreeze test3
Froze 1 filesystem(s)

2.# virsh managedsave test3
Domain test3 state saved by libvirt

3.# virsh start test3
Domain test3 started

4.# virsh domfsfreeze test3
error: Unable to freeze filesystems
error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance

5.# virsh domfsfreeze test3
Froze 1 filesystem(s)

And i check the guest status via virt-manager, the guest fs is still freezed after restore it, but i can do domfsfreeze to it and get a error, the interesting thing is after this error guest fs have been thaw, i can use domfsfreeze to this guest again.

Comment 5 Luyao Huang 2014-11-27 01:10:35 UTC
Hi Michal,

I meet a issue during verify this bug(please see comment 4).

Would you please help me to check out if it is a issue need fix
in this bug? Or it is a another issue need open a new bug?

Thanks in advance for your answer.

Comment 6 Michal Privoznik 2014-11-27 12:29:39 UTC
(In reply to Luyao Huang from comment #5)
> Hi Michal,
> 
> I meet a issue during verify this bug(please see comment 4).
> 
> Would you please help me to check out if it is a issue need fix
> in this bug? Or it is a another issue need open a new bug?
> 
> Thanks in advance for your answer.

Yep, that's a libvirt issue. I've proposed patch here:

https://www.redhat.com/archives/libvir-list/2014-November/msg01043.html

Comment 8 Peter Krempa 2014-12-01 09:50:31 UTC
Fixed upstream by:

commit 6085d917d5c5839b7ed351e99fadbbb56f5178fe
Author: Michal Privoznik <mprivozn>
Date:   Thu Nov 27 11:43:56 2014 +0100

    qemu: Don't track quiesced state of FSs
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1160084
    
    As of b6d4dad11b (1.2.5) we are trying to keep the status of FSFreeze
    in the guest. Even though I've tried to fixed couple of corner cases
    (6ea54769ba18), it occurred to me just recently, that the approach is
    broken by design. Firstly, there are many other ways to talk to
    qemu-ga (even through libvirt) that filesystems can be thawed (e.g.
    qemu-agent-command) without libvirt noticing. Moreover, there are
    plenty of ways to thaw filesystems without even qemu-ga noticing (yes,
    qemu-ga keeps internal track of FSFreeze status). So, instead of
    keeping the track ourselves, or asking qemu-ga for stale state, it's
    the best to let qemu-ga deal with that (and possibly let guest kernel
    propagate an error).
    
    Moreover, there's one bug with the following approach, if fsfreeze
    command failed, we've executed fsthaw subsequently. So issuing
    domfsfreeze in virsh gave the following result:
    
    virsh # domfsfreeze gentoo
    Froze 1 filesystem(s)
    
    virsh # domfsfreeze gentoo
    error: Unable to freeze filesystems
    error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance
    
    virsh # domfsfreeze gentoo
    Froze 1 filesystem(s)
    
    virsh # domfsfreeze gentoo
    error: Unable to freeze filesystems
    error: internal error: unable to execute QEMU agent command 'guest-fsfreeze-freeze': The command guest-fsfreeze-freeze has been disabled for this instance
    
    Signed-off-by: Michal Privoznik <mprivozn>

Comment 9 Shanzhi Yu 2014-12-04 09:10:31 UTC
I will change this bug to VERIFIED status after test with libvirt-1.2.8-10.el7.x86_64

After do domfsfreeze, then do save/managersave/migrate, it works as expected.
Steps refer to comment 0 and comment 4

Comment 11 errata-xmlrpc 2015-03-05 07:46:47 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/RHSA-2015-0323.html


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