Bug 2172098
Summary: | Support restarting passt process to preserve connectivity in case of inadvertent termination | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Jaroslav Suchanek <jsuchane> | |
Component: | libvirt | Assignee: | Laine Stump <laine> | |
libvirt sub component: | Networking | QA Contact: | yalzhang <yalzhang> | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | medium | |||
Priority: | unspecified | CC: | chayang, dzheng, haizhao, jdenemar, jinzhao, jsuchane, juzhang, laine, leiyang, lmen, lvivier, pvlasin, sbrivio, virt-maint, ymankad, zhguo | |
Version: | 9.2 | Keywords: | FutureFeature, Triaged | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-9.0.0-8.el9_2 | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 2169232 | |||
: | 2176923 (view as bug list) | Environment: | ||
Last Closed: | 2023-05-09 07:27:59 UTC | Type: | Feature Request | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 2169232 | |||
Bug Blocks: | 2176923 |
Description
Jaroslav Suchanek
2023-02-21 13:44:17 UTC
Patches posted upstream: https://listman.redhat.com/archives/libvir-list/2023-February/238076.html Pushed upstream: commit 70747222a73ffed5cdadcab492bef67fe7e49aa4 Author: Peter Krempa <pkrempa> Date: Mon Feb 20 17:25:08 2023 +0100 qemu: capabilities: Introduce QEMU_CAPS_NETDEV_STREAM_RECONNECT commit acd8333f763f1e45728fac4e727fef4e33141ebf Author: Laine Stump <laine> Date: Mon Feb 20 18:26:51 2023 -0500 qemu: add reconnect=5 to passt qemu commandline options when available commit f62ce81b8a57d8033be4c661e071cbd12b83bf7b (qemu-caps-netdev-reconnect-2) Author: Laine Stump <laine> Date: Tue Feb 21 01:16:04 2023 -0500 qemu: respond to NETDEV_STREAM_DISCONNECTED event There may be other prerequisites. I forgot that this patch is a prerequisite of the 2nd patch in the above list commit 6db7b2d2ca6493e253394c218bc2d1fbae0193e9 Author: Peter Krempa <pkrempa> Date: Fri Jan 6 09:54:32 2023 +0100 tests: qemucapabilitiesdata: Update for the qemu-8.0 development cycle The above patches are a part of this MR that was filed against the rhel-9.2.0 branch: https://gitlab.com/redhat/rhel/src/libvirt/-/merge_requests/98 Test on the scratch build libvirt-9.0.0-8.el9_rc.a7213e6de2.x86_64: Kill passt process by "kill -9", and check the passt process will be started again after 5s, and network recovers on the vm, the result is as expected. 1. start vm with passt backend interface: $ virsh dumpxml vm1 --xpath //interface <interface type="user"> <mac address="52:54:00:4e:92:81"/> <source dev="eno1"/> <model type="virtio"/> <backend type="passt" logFile="/home/test/passt.log"/> <alias name="net0"/> <acpi index="1"/> <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/> </interface> $ virsh start rhel login the vm and run ping, keep it running: # ping www.baidu.com PING www.a.shifen.com (182.61.200.7) 56(84) bytes of data. 64 bytes from 182.61.200.7 (182.61.200.7): icmp_seq=1 ttl=255 time=4.48 ms ... 2. Then on another terminal, run stap to check proper qmp commands; 3. On 3nd termial, kill the passt process, and check if it started again: $ ps aux | grep 'usr/bin/passt' | grep -v grep test 58195 0.0 0.0 76340 41264 ? Ss 20:44 0:00 /usr/bin/passt --one-off --socket /home/test/.cache/libvirt/qemu/run/passt/2-vm1-net0.socket --mac-addr 52:54:00:4e:92:81 --pid /home/test/.cache/libvirt/qemu/run/passt/2-vm1-net0-passt.pid --interface eno1 --log-file /home/test/passt.log $ kill -9 58195 ; ps aux | grep 'usr/bin/passt' | grep -v grep; sleep 5; ps aux | grep 'usr/bin/passt' | grep -v grep test 58262 0.0 0.0 76340 40356 ? Ss 20:50 0:00 /usr/bin/passt --one-off --socket /home/test/.cache/libvirt/qemu/run/passt/2-vm1-net0.socket --mac-addr 52:54:00:4e:92:81 --pid /home/test/.cache/libvirt/qemu/run/passt/2-vm1-net0-passt.pid --interface eno1 --log-file /home/test/passt.log check the outputs in the 2nd terminal: # stap /usr/share/doc/libvirt-docs/examples/systemtap/qemu-monitor.stp 0.000 begin 411.894 ! 0x7f9b8c0b2740 {"timestamp": {"seconds": 1678153851, "microseconds": 476466}, "event": "NETDEV_STREAM_DISCONNECTED", "data": {"netdev-id": "hostnet0"}} 417.181 ! 0x7f9b8c0b2740 {"timestamp": {"seconds": 1678153856, "microseconds": 763555}, "event": "NETDEV_STREAM_CONNECTED", "data": {"netdev-id": "hostnet0", "addr": {"path": "/home/test/.cache/libvirt/qemu/run/passt/2-vm1-net0.socket", "type": "unix"}}} And check on the vm, the ping recovers and continue running. Test with root user and unpriviledged user, with selinux enabled, and the steps in comment 9, the result is as expected. Test with packages below: $ rpm -q libvirt passt selinux-policy libvirt-9.0.0-10.el9_2.x86_64 passt-0^20230222.g4ddbcb9-2.el9_2.x86_64 selinux-policy-38.1.11-2.el9_2.noarch 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 (libvirt bug fix and enhancement update), 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/RHBA-2023:2171 |