Red Hat Bugzilla – Bug 741510
Aligning issue with snapshot XML description
Last modified: 2012-06-20 02:31:51 EDT
Description of problem: domain XML has aligning issue in snapshot XML output, that should be indent. <domainsnapshot> <name>s1</name> <state>running</state> <creationTime>1265418156</creationTime> <domain type='kvm'> <name>rhel6</name> <uuid>5bf39f9a-4845-5116-d339-00e924e50551</uuid> <memory>524288</memory> ... ... </domain> </domainsnapshot> Version-Release number of selected component (if applicable): libvirt-0.9.4-13.el6.x86_64 How reproducible: always Steps to Reproduce: # virsh snapshot-list rhel6 Name Creation Time State ------------------------------------------------------------ s1 2010-02-05 20:02:36 -0500 running # virsh snapshot-dumpxml rhel6 s1 Actual results: <domainsnapshot> ... <domain> ... </domain> </domainsnapshot> Expected results: <domainsnapshot> ... <domain> ... </domain> </domainsnapshot> Additional info:
This is cosmetic. Although I have a v1 upstream series proposed (and am working on v2 to address the comments raised), I do not think that backporting 14 patches for a cosemetic-only reason is appropriate this late in RHEL 6.2 development. I'd prefer to defer this to 6.3. https://www.redhat.com/archives/libvir-list/2011-September/msg00916.html
(In reply to comment #2) > This is cosmetic. Although I have a v1 upstream series proposed (and am > working on v2 to address the comments raised), I do not think that backporting > 14 patches for a cosemetic-only reason is appropriate this late in RHEL 6.2 > development. I'd prefer to defer this to 6.3. > > https://www.redhat.com/archives/libvir-list/2011-September/msg00916.html Agreed.
For the record, v2 of the series is here: https://www.redhat.com/archives/libvir-list/2011-September/msg01254.html
commit 9cba3927684f7fe46872fae74843087139a4cca2 Author: Eric Blake <eblake@redhat.com> Date: Sat Sep 17 06:57:30 2011 -0600 snapshot: indent domain xml when nesting <domainsnapshot> is the first public instance of <domain> being used as a sub-element, although we have two other private uses (runtime state, and migration cookie). Although indentation has no effect on XML parsing, using it makes the output more consistent. This uses virBuffer auto-indentation to obtain the effect, for all but the portions of <domain> that are not generated a line at a time into the same virBuffer. Further patches will clean up the remaining problems.
Test it with: libvirt-0.9.9-1.el6.x86_64 And the xml is the respected result. <domainsnapshot> ... <domain type='kvm'> ... </domain> </domainsnapshot>
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-2012-0748.html