Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-39497

nodedev-dumpxml lists unexpected parent

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.5
    • rhel-9.5
    • libvirt
    • None
    • libvirt-10.5.0-1.el9
    • None
    • Low
    • 1
    • sst_virtualization_hwe
    • ssg_virtualization
    • 23
    • 200
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • zKVM CY24Q3
    • s390x
    • 10.5.0
    • None

      What were you trying to do that didn't work?

      Inspect all device attributes of a node device which is a dasd disk.

      Please provide the package NVR for which bug is seen:

      10.3.0-2.el9.s390x

      How reproducible:

      100%

      Steps to reproduce

      1. Have a ccw device that's not configured, here 0.0.401c
        # # lscss
        Device   Subchan.  DevType CU Type Use  PIM PAM POM  CHPIDs           
        ----------------------------------------------------------------------
        ...
        0.0.401c 0.0.0028  3390/0c 3990/ec      f0  f0  ff   01020506 00000000
        ..
      1. Configure the device
        # chccwdev -e 0.0.401c
      1. Find the corresponding dasd node device
        # virsh nodedev-list|grep dasd
        block_dasda_0X401C
      1. Get the xml for the node device {code_bash}# virsh nodedev-dumpxml block_dasda_0x401C
        h3. Expected results
        
        The parent device is listed of type 'ccw'. (The expected full chain is dasd -> ccw -> css -> computer.)
        
        h3. Actual results
        
        'ccw' is omitted, the css is listed as parent although the ccw information is available:
        
        {code:xml}
        <device>
          <name>block_dasda_0X401C</name>
          <path>/sys/devices/css0/0.0.0028/0.0.401c/block/dasda</path>
          <devnode type='dev'>/dev/dasda</devnode>
          <devnode type='link'>/dev/disk/by-diskseq/303</devnode>
          <devnode type='link'>/dev/disk/by-id/ccw-0X401C</devnode>
          <devnode type='link'>/dev/disk/by-id/ccw-IBM.750000000CWR71.405a.1c</devnode>
          <devnode type='link'>/dev/disk/by-path/ccw-0.0.401c</devnode>
          <parent>css_0_0_0028</parent>
          <capability type='storage'>
            <block>/dev/dasda</block>
            <bus>ccw</bus>
            <drive_type>disk</drive_type>
            <vendor>IBM</vendor>
            <serial>0X401C</serial>
            <size>177248010240</size>
            <logical_block_size>4096</logical_block_size>
            <num_blocks>43273440</num_blocks>
          </capability>
        </device>

        It should say "ccw_0_0_401c" in the above snippet, check the disk/by-path info

      Additional info

      This also reproduces with 9.10.
      This error in the information chain doesn't lead to any functional problem, the device can still be passed through correctly after creating a mediated node device for it.
      It seems after a while and with some virtnodedevd restart the correct information is displayed though not reliably as my automated test will always hits this even when stop/starting the daemon, waiting and retrying.

            bfiuczyn Boris Fiuczynski
            smitterl@redhat.com Sebastian Mitterle
            IBM Confidential Group
            Boris Fiuczynski Boris Fiuczynski
            Liang Cong Liang Cong
            Votes:
            0 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated: