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 963624 - The libvirt didn't bypass the the file system cache while set the auto_start_bypass_cache = 1 in qemu.conf
Summary: The libvirt didn't bypass the the file system cache while set the auto_start_...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 963623
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-16 09:30 UTC by zhenfeng wang
Modified: 2013-05-21 02:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 963623
Environment:
Last Closed: 2013-05-21 02:14:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhenfeng wang 2013-05-16 09:30:10 UTC
+++ This bug was initially created as a clone of Bug #963623 +++

Description of problem:
The libvirt didn't bypass the the file system cache while restoring the guest from managed save file and set the auto_start_bypass_cache = 1 in qemu.conf

Version-Release number of selected component (if applicable):
libvirt-1.0.5-1.el7.x86_64
kernel-3.9.0-0.55.el7.x86_64
qemu-kvm-1.4.0-4.el7.x86_64
How reproducible:
100%

Steps
1.set the auto_start_bypass_cache = 1 in qemu.conf ,then restart libvirtd service
cat /etc/libvirt/qemu.conf
--
auto_start_bypass_cache = 1
--
2. start a guest and make sure the autostart is enabled
#virsh autostart rhelguest1

#virsh start rhelguest1

# virsh dominfo rhelguest1
Id:             1
Name:           rhelguest1
UUID:           fcf773e6-6eba-4e72-8299-de0a38c89136
OS Type:        hvm
State:          running
CPU(s):         1
CPU time:       16.9s
Max memory:     1048576 KiB
Used memory:    1048576 KiB
Persistent:     yes
Autostart:      enable

3.after the guest start completely,managedsave the guest
# virsh managedsave rhelguest1

4 restore the guest directly while the guest managedsave successfully
# virsh start rhel6  
Open another terminal, excute the following command before the guest finished starting,
found that the bypass-cache flag was not included in the following output

#while(true);do cat /proc/$(lsof -w /var/lib/libvirt/qemu/save/rhel6.save|awk '/libvirt_i/{print $2}')/fdinfo/*0*  ;done

this output didn't include the bypass-cache flag

5.however if start the domain with --bypass-cache ,we can get the expect value

# virsh start rhel6  --bypass-cache
Open another terminal, excute the following command before the guest finished starting,
you can see the third value was "4" in flags segment,it means --bypass-cache works

#while(true);do cat /proc/$(lsof -w /var/lib/libvirt/qemu/save/rhel6.save|awk '/libvirt_i/{print $2}')/fdinfo/*0*  ;done
pos:        34603008
flags:        0140000
pos:        163577856
flags:        0140000


Actual results:
In step 4 , we didn't found the bypass-cache flag in the second terminal , so the set about auto_start_bypass_cache=1 in qemu.conf didn't work

Expected results:
As the the auto_start_bypass_cache description in qemu.conf,When a domain is configured to be auto-started, enabling this flag should
has the same effect as using the VIR_DOMAIN_START_BYPASS_CACHE flag with the virDomainCreateWithFlags API.  That is, the system will
avoid using the file system cache when restoring any managed state file however. in my test they are different

Comment 2 Eric Blake 2013-05-21 02:14:38 UTC
Closing as NOTABUG, per comment 5 in bug 963623


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