Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 844266 - Fail to modify the domain xml with saved file
Fail to modify the domain xml with saved file
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Ján Tomko
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-30 03:23 EDT by zhenfeng wang
Modified: 2013-02-21 02:20 EST (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.10.0-0rc1.el6
Doc Type: Bug Fix
Doc Text:
Cause: The condition checking if the save image XML change was successful was inverted. Consequence: Virsh said it failed when it was successful and vice versa. Fix: Invert the condition. Result: Success and failure get reported correctly.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:20:21 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0276 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2013-02-20 16:18:26 EST

  None (edit)
Description zhenfeng wang 2012-07-30 03:23:42 EDT
Description of problem:
It reported "saved fail" when i modified the domain xml with saved file,but actually ,it saved successully

Version-Release number of selected component (if applicable):
# rpm -qa|grep libvirt
 libvirt-python-0.9.13-3.el6.x86_64
 libvirt-0.9.13-3.el6.x86_64
 libvirt-client-0.9.13-3.el6.x86_64
 libvirt-docs-0.9.13-2.el6.x86_64
 libvirt-devel-0.9.13-3.el6.x86_64
 qemu-kvm-rhev-0.12.1.2-2.299.el6.x86_64
# uname -r
 2.6.32-293.el6.x86_64
How reproducible:
100%

Steps to Reproduce:
1.# virsh save-image-edit rhel6-qcow2.save
 ..snip...

 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>restart</on_crash>
 ..snip...

Edit the xml:
 Update "<on_crash>restart</on_crash>" to"<on_crash>destroy</on_crash>"

2.Then save,it reported:
 # virsh save-image-edit rhel6-qcow2.save 
 Failed. Try again? [y,n,f,?]:n

3.# virsh restore rhel6-qcow2.save
 Domain restored from rhel6-qcow2.save

# virsh dumpxml rhel6-qcow2

 ..snip...
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>destroy</on_crash>
 ..snip...
  
Actual results:
when modify the xml, it saved successfully ,but reported " saved fail" error information

Expected results:
when modify the xml,it saved successfully and no reporting error information

Additional info:
Comment 3 Ján Tomko 2012-08-10 09:22:23 EDT
Upstream patch proposed:

https://www.redhat.com/archives/libvir-list/2012-August/msg00688.html
Comment 4 Ján Tomko 2012-08-14 03:56:57 EDT
Fixed by commit 863399f06b8dad8d7fc2e4b962d3cc566b69ed4c
    virsh: say save-image-edit failed only when it does
Comment 7 hongming 2012-08-26 22:10:30 EDT
Verified it using libvirt-0.10.0-0rc1.el6.x86_64. The result is expected. So move its status to VERIFIED.



Steps

1. # virsh save-image-edit rhel6.save

Edit the xml:
 Update "<on_crash>restart</on_crash>" to"<on_crash>destroy</on_crash>"

2. Save it .

State file rhel6.save edited.


3. # virsh restore rhel6.save
Domain restored from rhel6.save


4. # virsh dumpxml rhel6
......
  <on_crash>destroy</on_crash>
......
Comment 8 errata-xmlrpc 2013-02-21 02:20:21 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

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