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 1566416 - Storage device fails to validate for extra content " logical_block_size"
Summary: Storage device fails to validate for extra content " logical_block_size"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: John Ferlan
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-12 09:23 UTC by Jingjing Shao
Modified: 2018-10-30 09:55 UTC (History)
3 users (show)

Fixed In Version: libvirt-4.4.0-1.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-10-30 09:53:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3113 0 None None None 2018-10-30 09:55:50 UTC

Description Jingjing Shao 2018-04-12 09:23:35 UTC
Description of problem:
Storage device fails to validate for extra content " logical_block_size"

Version-Release number of selected component (if applicable):
libvirt-3.9.0-14.el7_5.2.x86_64

How reproducible:
100%

Steps to Reproduce:
1.# virsh nodedev-list --cap storage
block_sda_361866da06615c0001f3efbf90e133f74

2.# virsh nodedev-dumpxml block_sda_361866da06615c0001f3efbf90e133f74
<device>
  <name>block_sda_361866da06615c0001f3efbf90e133f74</name>
  <path>/sys/devices/pci0000:00/0000:00:01.0/0000:03:00.0/host0/target0:2:0/0:2:0:0/block/sda</path>
  <devnode type='dev'>/dev/sda</devnode>
  <devnode type='link'>/dev/disk/by-id/scsi-361866da06615c0001f3efbf90e133f74</devnode>
  <devnode type='link'>/dev/disk/by-id/wwn-0x61866da06615c0001f3efbf90e133f74</devnode>
  <devnode type='link'>/dev/disk/by-path/pci-0000:03:00.0-scsi-0:2:0:0</devnode>
  <parent>scsi_0_2_0_0</parent>
  <capability type='storage'>
    <block>/dev/sda</block>
    <bus>scsi</bus>
    <drive_type>disk</drive_type>
    <model>PERC H730 Mini</model>
    <vendor>DELL</vendor>
    <serial>361866da06615c0001f3efbf90e133f74</serial>
    <size>599550590976</size>
    <logical_block_size>512</logical_block_size>
    <num_blocks>1170997248</num_blocks>
  </capability>
</device>

3. # virsh nodedev-dumpxml block_sda_361866da06615c0001f3efbf90e133f74  > storage.xml

4. # virt-xml-validate  storage.xml  nodedev
storage.xml:17: element logical_block_size: Relax-NG validity error : Element capability has extra content: logical_block_size
storage.xml fails to validate


Actual results:
Storage device fails to validate

Expected results:
The storage device should to be validated successfully

Additional info:
N/A

Comment 2 John Ferlan 2018-05-19 12:16:25 UTC
Posted patches for a number of grammar issues:

https://www.redhat.com/archives/libvir-list/2018-May/msg01455.html

for this particular one, it's patch 8:

https://www.redhat.com/archives/libvir-list/2018-May/msg01463.html

Comment 3 John Ferlan 2018-05-25 14:36:16 UTC
Patch is now pushed:

commit 4804a4db33a37f828d033733bc47f6eff5d262c3
Author: John Ferlan <jferlan>
Date:   Sat May 19 08:00:58 2018 -0400

    schema: Add missing block data for nodedev
    
...    

    Commit id 'fe2af45b' added output for logical_block_size and
    num_blocks for both removeable and fixed storage, but did not
    update the nodedev capability causing virt-xml-validate to fail.
    It's listed as optional only because it only prints if the
    sizes are > 0. For a CDROM drive the values won't be formatted.
    
    Update the nodedevxml2xmltest in order to output the values
    for storage based on the logic from udevProcessRemoveableMedia
    and udevProcessSD with respect to the logical_blocksize and
    num_blocks calculations.
...

$ git describe 4804a4db33a37f828d033733bc47f6eff5d262c3
v4.3.0-322-g4804a4db33
$

Comment 5 yisun 2018-06-22 03:05:59 UTC
Verified with: libvirt-4.4.0-2.virtcov.el7.x86_64

Steps:
1. Having a block device which xml contains "logical_block_size" and "num_blocks"
# virsh nodedev-list --cap storage
block_sda_WDC_WD2500AAJS_75M0A0_WD_WMAV24703289
...


# virsh nodedev-dumpxml block_sda_WDC_WD2500AAJS_75M0A0_WD_WMAV24703289
<device>
  <name>block_sda_WDC_WD2500AAJS_75M0A0_WD_WMAV24703289</name>
  <path>/sys/devices/pci0000:00/0000:00:0e.0/ata1/host0/target0:0:0/0:0:0:0/block/sda</path>
  <devnode type='dev'>/dev/sda</devnode>
  <devnode type='link'>/dev/disk/by-id/ata-WDC_WD2500AAJS-75M0A0_WD-WMAV24703289</devnode>
  <devnode type='link'>/dev/disk/by-id/wwn-0x50014ee0abd7f02e</devnode>
  <devnode type='link'>/dev/disk/by-path/pci-0000:00:0e.0-ata-1.0</devnode>
  <parent>scsi_0_0_0_0</parent>
  <capability type='storage'>
    <block>/dev/sda</block>
    <bus>ata</bus>
    <drive_type>disk</drive_type>
    <model>WDC WD2500AAJS-7</model>
    <vendor>ATA</vendor>
    <serial>WDC_WD2500AAJS-75M0A0_WD-WMAV24703289</serial>
    <size>250000000000</size>
    <logical_block_size>512</logical_block_size>
    <num_blocks>488281250</num_blocks>
  </capability>
</device>

2. save above xml and validate it
# virsh nodedev-dumpxml block_sda_WDC_WD2500AAJS_75M0A0_WD_WMAV24703289 > blk1.xml

# virt-xml-validate blk1.xml 
blk1.xml validates

Comment 7 errata-xmlrpc 2018-10-30 09:53:26 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://access.redhat.com/errata/RHSA-2018:3113


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