Bug 1170140

Summary: indent for <sysinfo>
Product: Red Hat Enterprise Linux 7 Reporter: Jincheng Miao <jmiao>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 7.1CC: dyuan, jdenemar, lhuang, mzhan, rbalakri
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.2.13-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 05:57:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jincheng Miao 2014-12-03 11:29:23 UTC
Description of problem:
<sysinfo> is not indented.

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

How reproducible:
100%

Steps to Reproduce:
1. edit domain xml
# virsh edit aaa
...
    <sysinfo type='smbios'>
      <bios>
        <entry name='vendor'>LENOVO</entry>
      </bios>
    </sysinfo>
...

2. dumpxml for domain, <sysinfo> is not indented
# virsh dumpxml aaa
  <numatune>
    <memory mode='strict' placement='auto'/>
  </numatune>
    <sysinfo type='smbios'>
      <bios>
        <entry name='vendor'>LENOVO</entry>
      </bios>
    </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>

Expect result:
<sysinfo> get to be indented.

Comment 1 Jiri Denemark 2014-12-03 12:12:46 UTC
This is already fixed upstream by v1.2.9-133-g0d36a5d:

commit 0d36a5d05a57a7c2c0f6b20c29fcabfe0f0f15c5
Author: Daniel P. Berrange <berrange>
Date:   Thu Oct 23 18:35:57 2014 +0100

    Fix indentation of sysinfo data
    
    The <sysinfo> data block was indented by 2 spaces too many.
    This was missed because we never had any test validating
    the XML formatting.

Comment 3 Luyao Huang 2015-05-22 06:48:50 UTC
Verify this bug with libvirt-1.2.15-2.el7.x86_64:

1. prepare a offline domain and add <sysinfo> in xml:

# virsh edit test3

  <sysinfo type='smbios'>
    <bios>
      <entry name='vendor'>LENOVO</entry>
    </bios>
    <system>
      <entry name='manufacturer'>Fedora</entry>
      <entry name='product'>Virt-Manager</entry>
      <entry name='version'>0.9.4</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='cdrom'/>
    <smbios mode='sysinfo'/>
  </os>

Domain test3 XML configuration edited.

2. recheck the xml:

# virsh dumpxml test3

  <sysinfo type='smbios'>
    <bios>
      <entry name='vendor'>LENOVO</entry>
    </bios>
    <system>
      <entry name='manufacturer'>Fedora</entry>
      <entry name='product'>Virt-Manager</entry>
      <entry name='version'>0.9.4</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
    <boot dev='cdrom'/>
    <smbios mode='sysinfo'/>
  </os>

Comment 6 errata-xmlrpc 2015-11-19 05:57:00 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/RHBA-2015-2202.html