Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix false failure of virtual_disks.multidisks.coldplug.single_disk_test.disk_bus_device_option.disk_bus_usb.device_disk.error_test4 #3275

Open
qiankehan opened this issue Jan 26, 2021 · 0 comments

Comments

@qiankehan
Copy link
Contributor

qiankehan commented Jan 26, 2021

Error Failed to define domain from /tmp/xml_utils_temp_bs3scmwt.xmlerror: internal error: unexpected address type for usb disk happened when define the xml(pci addr in usb disk):

<?xml version='1.0' encoding='UTF-8'?><domain type="kvm">  <name>avocado-vt-vm1</name>  <uuid>598729f8-af94-4a5e-b56b-117cadd6c933</uuid>  <metadata>    <ns0:libosinfo xmlns:ns0="http://libosinfo.org/xmlns/libvirt/domain/1.0">      <ns0:os id="http://redhat.com/rhel/8.3" />    </ns0:libosinfo>  </metadata>  <memory unit="KiB">1048576</memory>  <currentMemory unit="KiB">1048576</currentMemory>  <vcpu placement="static">2</vcpu>  <os>    <type arch="x86_64" machine="pc-q35-rhel8.4.0">hvm</type>    <boot dev="hd" />  </os>  <features>    <acpi />    <apic />  </features>  <cpu check="partial" mode="host-model">    <feature name="vmx" policy="disable" />  </cpu>  <clock offset="utc">    <timer name="rtc" tickpolicy="catchup" />    <timer name="pit" tickpolicy="delay" />    <timer name="hpet" present="no" />  </clock>  <on_poweroff>destroy</on_poweroff>  <on_reboot>restart</on_reboot>  <on_crash>destroy</on_crash>  <pm>    <suspend-to-mem enabled="no" />    <suspend-to-disk enabled="no" />  </pm>  <devices><emulator>/usr/libexec/qemu-kvm</emulator><disk device="disk" type="file">      <driver name="qemu" type="qcow2" />      <source file="/var/lib/avocado/data/avocado-vt/images/jeos-27-x86_64.qcow2" />      <target bus="virtio" dev="vda" />      <address bus="0x04" domain="0x0000" function="0x0" slot="0x00" type="pci" />    </disk><controller index="0" type="sata">      <address bus="0x00" domain="0x0000" function="0x2" slot="0x1f" type="pci" />    </controller><controller index="0" model="pcie-root" type="pci" /><controller index="1" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="1" port="0x10" />      <address bus="0x00" domain="0x0000" function="0x0" multifunction="on" slot="0x02" type="pci" />    </controller><controller index="2" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="2" port="0x11" />      <address bus="0x00" domain="0x0000" function="0x1" slot="0x02" type="pci" />    </controller><controller index="3" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="3" port="0x12" />      <address bus="0x00" domain="0x0000" function="0x2" slot="0x02" type="pci" />    </controller><controller index="4" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="4" port="0x13" />      <address bus="0x00" domain="0x0000" function="0x3" slot="0x02" type="pci" />    </controller><controller index="5" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="5" port="0x14" />      <address bus="0x00" domain="0x0000" function="0x4" slot="0x02" type="pci" />    </controller><controller index="6" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="6" port="0x15" />      <address bus="0x00" domain="0x0000" function="0x5" slot="0x02" type="pci" />    </controller><controller index="7" model="pcie-root-port" type="pci">      <model name="pcie-root-port" />      <target chassis="7" port="0x16" />      <address bus="0x00" domain="0x0000" function="0x6" slot="0x02" type="pci" />    </controller><controller index="0" type="virtio-serial">      <address bus="0x03" domain="0x0000" function="0x0" slot="0x00" type="pci" />    </controller><interface type="network">      <mac address="52:54:00:3f:2f:b2" />      <source network="default" />      <model type="virtio" />      <address bus="0x01" domain="0x0000" function="0x0" slot="0x00" type="pci" />    </interface><serial type="pty">      <target port="0" type="isa-serial">        <model name="isa-serial" />      </target>    </serial><console type="pty">      <target port="0" type="serial" />    </console><channel type="unix">      <target name="org.qemu.guest_agent.0" type="virtio" />      <address bus="0" controller="0" port="1" type="virtio-serial" />    </channel><input bus="ps2" type="mouse" /><input bus="ps2" type="keyboard" /><graphics autoport="yes" port="-1" type="vnc">      <listen type="address" />    </graphics><video>      <model heads="1" primary="yes" ram="65536" type="qxl" vgamem="16384" vram="65536" />      <address bus="0x00" domain="0x0000" function="0x0" slot="0x01" type="pci" />    </video><memballoon model="virtio">      <address bus="0x05" domain="0x0000" function="0x0" slot="0x00" type="pci" />    </memballoon><rng model="virtio">      <backend model="random">/dev/urandom</backend>      <address bus="0x06" domain="0x0000" function="0x0" slot="0x00" type="pci" />    </rng><disk device="disk" type="file"><source file="/tmp/avocado_pl4pcr19/disk.raw" /><target bus="usb" dev="sda" /><driver cache="none" name="qemu" type="raw" /><address bus="0x00" domain="0x0000" function="0x0" slot="0x09" type="pci" /></disk><controller index="0" model="piix3-uhci" type="usb" /><controller index="1" model="ich9-ehci1" type="usb" /><input bus="usb" type="tablet" /><hub type="usb" /></devices></domain>

The false failure is because libvirt move the validation code from domain start API to domain define API. See https://gitlab.com/libvirt/libvirt/-/commit/aa65f0f2f1
@chunfuwen Please move the error checking to virsh define after libvirt-6.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant