Guest crashed when detaching the ovs interface device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu on IBM z Systems |
Fix Released
|
Medium
|
Unassigned | ||
linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
qemu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When detaching one openvswitch interface device with virsh detach-device, if the port has been deleted from the ovs and the interface device has been deleted. The virsh detach-device will fail with "error: Unable to read from monitor: Connection reset by peer", the qemu is terminated and the log shows " UNSETVNETLE ioctl() failed, File descriptor in bad state".
[Background] This error is originally found from the openstack KVM CI tempest test. By investigating I found it's introduced by one ovs-vif patch, which deletes the ovs port and delete the interface before detaching the device. You can find the commit from https:/
Reproduced:
root@xxxx:~# ovs-vsctl del-port br0 tap9273235a-dd
root@xxxx:~# ip link del tap9273235a-dd
The interface device tap9273235a-dd has been removed from the host(ifconfg, ovs-vsctl show) and can be found in the guest.(logon the guest, ip a it's in down state)
root@xxxx:~# virsh detach-device kvm net.xml
error: Failed to detach device from net.xml
error: Unable to read from monitor: Connection reset by peer
The qemu has terminated and the log in /var/log/
TUNSETVNETLE ioctl() failed: File descriptor in bad state.
2019-01-18 08:16:11.304+0000: shutting down, reason=crashed
It seems the qemu tried to handle this interface, but in fact it has been deleted. qemu couldn't read the file and give the error.
But I don't think the guest should be crashed directly for the file descriptor error.
Environment:
Ubuntu 16.04.5 LTS
Linux (EC12) 4.4.0-141-generic
QEMU emulator version 2.11.1(Debian 1:2.11+
libvirtd (libvirt) 4.0.0
net.xml
<interface type='bridge'>
<mac address=
<source bridge='br0'/>
<virtualport type='openvswitch'>
<parameters interfaceid=
</virtualport>
<target dev='tap9273235
<model type='virtio'/>
<mtu size='1450'/>
<alias name='net1'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0005'/>
</interface>
kvm.xml
<domain type='kvm' id='31'>
<name>kvm</name>
<uuid>
<memory unit='KiB'
<currentMemory unit='KiB'
<vcpu placement=
<resource>
<partition>
</resource>
<os>
<type arch='s390x' machine=
<boot dev='hd'/>
</os>
<cpu>
<topology sockets='1' cores='1' threads='1'/>
</cpu>
<clock offset='utc'/>
<on_poweroff>
<on_reboot>
<on_crash>
<devices>
<emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/
<
<target dev='vda' bus='virtio'/>
<alias name='virtio-
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
</disk>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target type='sclp' port='0'/>
<alias name='console0'/>
</console>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
</memballoon>
<panic model='s390'/>
</devices>
<seclabel type='dynamic' model='apparmor' relabel='yes'>
<label>
<imagelabel
</seclabel>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>
<imagelabel
</seclabel>
</domain>
tags: |
added: s390x removed: detach device |
tags: | added: architecture-s39064 bugnameltc-174882 severity-high targetmilestone-inin16045 |
affects: | qemu-kvm (Ubuntu) → qemu (Ubuntu) |
Changed in ubuntu-z-systems: | |
status: | New → Incomplete |
Changed in ubuntu-z-systems: | |
importance: | Undecided → Medium |
tags: | added: qemu-19.10 |
Changed in linux (Ubuntu): | |
status: | Incomplete → Invalid |
Changed in ubuntu-z-systems: | |
status: | Incomplete → In Progress |
Changed in qemu (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in ubuntu-z-systems: | |
status: | In Progress → Fix Released |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1812822
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.