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

Updating mdev node device in active state should have a better error message

    • None
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None

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

      The capability of updating a mdev node device can be done on the persisted state, on the active state or on both(got this information from its patch series). But now it updates failed in active state.

      Please provide the package NVR for which bug is seen:

      libvirt-10.4.0-1.el9.x86_64
      qemu-kvm-9.0.0-3.el9.x86_64
      mdevctl-1.3.0-4.el10.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1. Prepare a mdev device in active state.

      virsh nodedev-info mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0
      Name:           mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0
      Parent:         pci_0000_b1_02_0
      Active:         yes
      Persistent:     yes
      Autostart:      no 
      # virsh nodedev-dumpxml mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0
      <device>
       <name>mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0</name>
       <path>/sys/devices/pci0000:b0/0000:b0:02.0/0000:b1:02.0/1742c362-9874-4ce3-a38c-1fe992a7a635</path>
        <parent>pci_0000_b1_02_0</parent>
        <driver>
          <name>nvidia-vgpu-vfio</name>
        </driver>
        <capability type='mdev'>
          <type id='nvidia-747'/>
          <uuid>1742c362-9874-4ce3-a38c-1fe992a7a635</uuid>
          <parent_addr>0000:b1:02.0</parent_addr>
          <iommuGroup number='259'/>
        </capability>
      </device>

      2. Prepare a updated mdev device xml with new added attrs.

      # virsh nodedev-dumpxml mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0 >update.xml 
      # cat update.xml 
      <device>
       <name>mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0</name>
       <path>/sys/devices/pci0000:b0/0000:b0:02.0/0000:b1:02.0/1742c362-9874-4ce3-a38c-1fe992a7a635</path>
        <parent>pci_0000_b1_02_0</parent>
        <driver>
          <name>nvidia-vgpu-vfio</name>
        </driver>
        <capability type='mdev'>
          <type id='nvidia-747'/>
          <uuid>1742c362-9874-4ce3-a38c-1fe992a7a635</uuid>
          <parent_addr>0000:b1:02.0</parent_addr>
          <iommuGroup number='259'/>
          <attr name='assign_adapter' value='0x01'/>
          <attr name='assign_domain' value='0x002c'/>
        </capability>
      </device>

      3. Update the mdev node device.

      # virsh nodedev-update mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0 update.xml 
      error: Failed to update node device mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0 from 'update.xml'
      error: internal error: Unable to modify mediated device: Error: No callout script with version support found that supports live modify 

      4. Destroy the node device to change it to only persistent and then update.

      # virsh nodedev-update mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0 update.xml Updated node device mdev_1742c362_9874_4ce3_a38c_1fe992a7a635_0000_b1_02_0 persistent config 

      Expected results: 

      Can update node device successfully in step 3.

      Actual results

      Filed update node device in active state.

              jjongsma@redhat.com Jonathon Jongsma
              rhn-support-meili Meina Li
              Jonathon Jongsma Jonathon Jongsma
              virt-bugs virt-bugs
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: