Bug 1593563 - xml of scsi_generic and vports device fail to validate
Summary: xml of scsi_generic and vports device fail to validate
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-21 05:44 UTC by yalzhang@redhat.com
Modified: 2024-12-17 12:26 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-12-17 12:26:22 UTC
Embargoed:


Attachments (Terms of Use)

Description yalzhang@redhat.com 2018-06-21 05:44:16 UTC
Description of problem:
xml of scsi_generic and vports device fail to validate

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

How reproducible:
100%

Steps to Reproduce:
1. xml of scsi_generic device fail to validate:

# virsh nodedev-list --cap scsi_generic
scsi_generic_sg0

# virsh nodedev-dumpxml scsi_generic_sg0 > generic

# virt-xml-validate generic
generic:6: element capability: Relax-NG validity error : Element capability failed to validate content

# virsh nodedev-dumpxml scsi_generic_sg0 
<device>
  <name>scsi_generic_sg0</name>
  <path>/sys/devices/pci0000:00/0000:00:03.0/0000:09:00.0/host0/target0:2:0/0:2:0:0/scsi_generic/sg0</path>
  <devnode type='dev'>/dev/sg0</devnode>
  <parent>scsi_0_2_0_0</parent>
  <capability type='scsi_generic'>
    <char>/dev/sg0</char>
  </capability>
</device>

2. xml of HBA device failed to validate
# virsh nodedev-list --cap vports
scsi_host8
scsi_host9

# virsh nodedev-dumpxml scsi_host9 > host9
# virt-xml-validate host9
host9:7: element unique_id: Relax-NG validity error : Element capability has extra content: unique_id
host9 fails to validate

# virsh nodedev-dumpxml scsi_host9
<device>
  <name>scsi_host9</name>
  <path>/sys/devices/pci0000:00/0000:00:09.0/0000:18:00.0/host9</path>
  <parent>pci_0000_18_00_0</parent>
  <capability type='scsi_host'>
    <host>9</host>
    <unique_id>9</unique_id>
    <capability type='fc_host'>
      <wwnn>20000024ff370144</wwnn>
      <wwpn>21000024ff370144</wwpn>
      <fabric_wwn>ffffffffffffffff</fabric_wwn>
    </capability>
    <capability type='vport_ops'>
      <max_vports>254</max_vports>
      <vports>0</vports>
    </capability>
  </capability>
</device>

Actual results:
xml of scsi_generic and scsi_host(with vports) device fail to validate

Expected results:
should succeed to validate

Additional info:
fc_host without vport pass the validation
# virsh nodedev-list --cap fc_host
scsi_host10
scsi_host12
scsi_host8
scsi_host9

# virsh nodedev-list --cap vports
scsi_host8
scsi_host9

# virsh nodedev-dumpxml scsi_host12 > scsi_host
# virt-xml-validate scsi_host
scsi_host validates

# virsh nodedev-dumpxml scsi_host12
<device>
  <name>scsi_host12</name>
  <path>/sys/devices/pci0000:00/0000:00:09.0/0000:18:00.1/host8/vport-8:0-3/host12</path>
  <parent>scsi_host8</parent>
  <capability type='scsi_host'>
    <host>12</host>
    <unique_id>12</unique_id>
    <capability type='fc_host'>
      <wwnn>20000024ff370144</wwnn>
      <wwpn>2101001b32a90000</wwpn>
      <fabric_wwn>2001000dec9877c1</fabric_wwn>
    </capability>
  </capability>
</device>

Comment 2 Daniel Berrangé 2024-12-17 12:26:22 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.


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