Bug 2178553
Summary: | Should show complete error info if hotplugging passt backend interface failed | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | yafu <yafu> |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> |
libvirt sub component: | Networking | QA Contact: | yalzhang <yalzhang> |
Status: | CLOSED DUPLICATE | Docs Contact: | |
Severity: | low | ||
Priority: | low | CC: | lmen, mprivozn, virt-maint, yalzhang |
Version: | 9.2 | ||
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-03-23 13:57:46 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yafu
2023-03-15 09:08:39 UTC
Fixed by the following commit: commit 02355840ced2af18df1aa9ba387a6137a515eede Author: Michal Prívozník <mprivozn> AuthorDate: Thu Feb 16 12:19:26 2023 +0100 Commit: Michal Prívozník <mprivozn> CommitDate: Mon Feb 20 09:43:14 2023 +0100 qemu_passt: Report passt's error on failed start When starting passt, it may write something onto its stderr (convincing it to print even more is addressed later). Pass this string we read to user. Since we're not daemonizing passt anymore (see previous commit), we can let virCommand module do all the heavy lifting and switch to virCommandSetErrorBuffer() instead of reading error from an FD. Signed-off-by: Michal Privoznik <mprivozn> Reviewed-by: Stefano Brivio <sbrivio> Reviewed-by: Laine Stump <laine> which is part of libvirt-9.1.0 release. Test on libvirt-9.2.0-1.el9.x86_64 with the same scenarios in comment 0, the bug is fixed: 1) no permission to create the log file: $ cat interface.xml <interface type="user"> <mac address="52:54:00:bc:fa:5e"/> <source dev="eno1"/> <model type="virtio"/> <backend type="passt" logFile='/var/log/test.log'/> <alias name="net0"/> </interface> $ virsh attach-device vm1 interface.xml error: Failed to attach device from interface.xml error: internal error: Child process (/usr/bin/passt --one-off --socket /run/user/1000/libvirt/qemu/run/passt/1-vm1-net0.socket --mac-addr 52:54:00:bc:fa:5e --pid /run/user/1000/libvirt/qemu/run/passt/1-vm1-net0-passt.pid --interface eno1 --log-file /var/log/test.log) unexpected exit status 1: Couldn't open log file /var/log/test.log: Permission denied 2) no log dir: $ cat interface1.xml <interface type="user"> <mac address="52:54:00:bc:fa:5e"/> <source dev="eno1"/> <model type="virtio"/> <backend type="passt" logFile='/var/no_dir/test.log'/> <alias name="net0"/> </interface> $ virsh attach-device vm1 interface1.xml error: Failed to attach device from interface1.xml error: internal error: Child process (/usr/bin/passt --one-off --socket /run/user/1000/libvirt/qemu/run/passt/1-vm1-net0.socket --mac-addr 52:54:00:bc:fa:5e --pid /run/user/1000/libvirt/qemu/run/passt/1-vm1-net0-passt.pid --interface eno1 --log-file /var/no_dir/test.log) unexpected exit status 1: Couldn't open log file /var/no_dir/test.log: No such file or directory |