Bug 1037454

Summary: succeed creating an volume with wrong elements in xml file and there is no error output
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Shanzhi Yu <shyu>
Component: libvirtAssignee: Jonathon Jongsma <jjongsma>
Status: CLOSED DEFERRED QA Contact: Meina Li <meili>
Severity: low Docs Contact:
Priority: low    
Version: ---CC: acathrow, bili, dyuan, jdenemar, lmen, mzhan, rbalakri, xuzhang, zsong
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-20 16:16:37 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:
Embargoed:

Description Shanzhi Yu 2013-12-03 08:26:44 UTC
Description of problem:

succeed creating an volume with wrong elements in xml file and there is no error output

Version-Release number of selected component (if applicable):

qemu-kvm-1.5.3-20.el7.x86_64
libvirt-1.1.1-13.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

1. create an wrong vol xml file

# cat vol.xml 
<volume>
  <name>test-vol</name>
  <source>
  </source>
  <capacity unit='bytes'>1073741824</capacity>
  <allocation unit='bytes'>139264</allocation>
  <target>
    <format type='qcow2'/>
    <compat>1.1</compat>
    <features>
    <lazy_refcounts>on</lazy_refcounts>   
    </features>
  </target>
</volume>

# virt-xml-validate vol.xml storagevol
vol.xml:11: element lazy_refcounts: Relax-NG validity error : Did not expect text in element lazy_refcounts content
vol.xml fails to validate

2. create an volume with the wrong xml file

# virsh vol-create default vol.xml
Vol test-vol created from vol.xml

# qemu-img /var/lib/libvirt/images/test-vol
image: /var/lib/libvirt/images/test-vol
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 136K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: true

Actual results:


Expected results:

in step2, there should be some error info like "not expect text in element lazy_refcounts content" and create volume with failure

Additional info:

<lazy_refcounts>on</lazy_refcounts> should be <lazy_refcounts/>, if want to set lazy refcounts off, just exclude <lazy_refcounts/>

Comment 1 Jiri Denemark 2013-12-03 08:58:06 UTC

*** This bug has been marked as a duplicate of bug 888748 ***

Comment 2 zhengqin 2013-12-24 06:27:08 UTC
Could reproduce this bug with the steps as bug mentioned.

Comment 3 lijuan men 2015-10-15 09:49:37 UTC
The bug has been duplicated of bug 888748, that has been  verified. But in the latest version,the problem of this bug still exist.So the bug is reopened.

Version-Release number of selected component (if applicable):

qemu-kvm-1.5.3-104.el7.x86_64
libvirt-1.2.17-13.el7.x86_64

How reproducible:

100%

Steps to Reproduce:

1. create an wrong vol xml file

# cat vol.xml 
<volume>
  <name>test-vol</name>
  <source>
  </source>
  <capacity unit='bytes'>1073741824</capacity>
  <allocation unit='bytes'>139264</allocation>
  <target>
    <format type='qcow2'/>
    <compat>1.1</compat>
    <features>
    <lazy_refcounts>on</lazy_refcounts>   
    </features>
  </target>
</volume>



2. create an volume with the wrong xml file

# virsh vol-create default vol.xml
Vol test-vol created from vol.xml


Actual results:
the volume is created successfully

Expected results:

in step2, there should be some error info like "not expect text in element lazy_refcounts content" and create volume with failure

Comment 6 Jaroslav Suchanek 2020-10-20 16:16:37 UTC
This bug was closed deferred as a result of bug triage.

Please reopen if you disagree and provide justification why this bug should
get enough priority. Most important would be information about impact on
customer or layered product. Please indicate requested target release.