Bug 1037454 - succeed creating an volume with wrong elements in xml file and there is no error output
Summary: succeed creating an volume with wrong elements in xml file and there is no er...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: ---
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Jonathon Jongsma
QA Contact: Meina Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-03 08:26 UTC by Shanzhi Yu
Modified: 2020-10-20 16:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-20 16:16:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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