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 1223631 - smbios, sysinfo, idmap, metadata will lose if we set a memory device in the xml
Summary: smbios, sysinfo, idmap, metadata will lose if we set a memory device in the xml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-21 05:00 UTC by Luyao Huang
Modified: 2015-11-19 06:31 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.2.16-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 06:31:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2015-05-21 05:00:52 UTC
description of problem:
smbios, sysinfo, idmap, metadata will lose if we set a memory device in the xml

Version-Release number of selected component (if applicable):
libvirt-1.2.15-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. edit a guest xml like this:
# virsh edit test3

  <maxMemory slots='16' unit='KiB'>2560000</maxMemory>
  <memory unit='KiB'>1536000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
...
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
    <boot dev='hd'/>
    <smbios mode='sysinfo'/>
  </os>
...
  <cpu mode='host-model'>
    <model fallback='forbid'/>
    <numa>
      <cell id='0' cpus='0-1' memory='512000' unit='KiB'/>
      <cell id='1' cpus='2-3' memory='512000' unit='KiB'/>
    </numa>
  </cpu>
...
    <memory model='dimm'>
      <target>
        <size unit='KiB'>512000</size>
        <node>1</node>
      </target>
    </memory>

Domain test3 XML configuration not changed.

2. recheck the xml:
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
    <boot dev='hd'/>
  </os>



Actual results:
smbios, sysinfo, idmap, metadata will lose if we set a memory device in the xml

Expected results:
libvirt can parse smbios, sysinfo, idmap, metadata when set a memory device

infomation:

Additional info:

Comment 1 Luyao Huang 2015-05-21 05:10:17 UTC
Send a patch to upstream:

https://www.redhat.com/archives/libvir-list/2015-May/msg00674.html

Comment 2 Peter Krempa 2015-05-21 09:07:35 UTC
Fixed upstream:

commit aef2a0a26c42efeedd25ad570269f5f1cc9da6b5
Author: Luyao Huang <lhuang>
Date:   Thu May 21 13:08:12 2015 +0800

    conf: Restore the XML parser context in virDomainMemoryDefParseXML
    
    After parsing the memory device XML the function would not restore the
    XML parser context causing invalid XPath starting point for the rest of
    the elements. This is a regression since 3e4230d2.
    
    The test case addition uses the <idmap> element that is currently unused
    by qemu, but parsed after the memory device definition and formatted
    always.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1223631
    
    Signed-off-by: Luyao Huang <lhuang>
    Signed-off-by: Peter Krempa <pkrempa>

v1.2.15-119-gaef2a0a

Comment 4 Fangge Jin 2015-08-26 11:55:20 UTC
I can reproduce this bug on build libvirt-1.2.15-2.el7.x86_64

Verify this bug on build libvirt-1.2.17-6.el7.x86_64

Steps:
1.Edit a guest xml like this:
# virsh edit rhel7d1
...
  <maxMemory slots='16' unit='KiB'>2560000</maxMemory>
  <memory unit='KiB'>1024000</memory>
  <currentMemory unit='KiB'>1024000</currentMemory>
...
  <os>
    <type arch='x86_64' machine='pc-i440fx-rhel7.1.0'>hvm</type>
    <boot dev='hd'/>
    <boot dev='cdrom'/>
    <bootmenu enable='yes' timeout='3000'/>
    <bios useserial='yes' rebootTimeout='0'/>
    <smbios mode='sysinfo'/>
  </os>
  <sysinfo type='smbios'>
    <bios>
      <entry name='vendor'>LENOVO</entry>
    </bios>
  </sysinfo>
  <idmap>
    <uid start='0' target='1000' count='10'/>
    <gid start='0' target='1000' count='10'/>
  </idmap>
...
    <memory model='dimm'>
      <target>
        <size unit='KiB'>512000</size>
        <node>1</node>
      </target>
    </memory>
...
Domain rhel7d1 XML configuration edited.

2.Recheck the xml, all the attributes still exist.

Comment 6 errata-xmlrpc 2015-11-19 06:31:22 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


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