Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 810628

Summary: app-emulation/qemu-guest-agent-6.0.0 startup script shows no error despite failure
Product: Gentoo Linux Reporter: PetaMem R&D <info>
Component: Current packagesAssignee: John Helmert III <ajak>
Status: UNCONFIRMED ---    
Severity: minor CC: michal.privoznik, sam, tamiko, virtualization, zlogene
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description PetaMem R&D 2021-08-27 07:59:13 UTC
/etc/init.de/qemu-guest-agent start shows OK despite failing
Had made an own kernel missing virtio serial, qemu guest agent didn't run.
Took some log inspection and internet searching to find out virtio serial could be missing in the kernel.

This bug is minor, yet responsible for two unnecessary reboots because "not working" isn't signaled when it should and comes as a surprise later.

Reproducible: Always

Steps to Reproduce:
1. make kernel missing virtio serial
2. emerge qemu-guest-agent and start script

Actual Results:  
startup script shows always [OK] despite qemu-ga not being started

Expected Results:  
startup script should not show [OK] if qemu-ga fails being started
Comment 1 Michal Prívozník 2024-11-04 10:01:24 UTC
Yeah, this is because the init script passes '-d' flag which causes two things:

1) qemu-ga daemonizes itself, unnecessarily. start-stop-daemon already does that,

2) due to a bug in qemu-ga, it fails to report error onto stderr and fails to return EXIT_FAILURE.

Patches for 2) are posted here:

https://lists.nongnu.org/archive/html/qemu-devel/2024-11/msg00460.html

I'll open a MR to drop '-d' flag in a while.
Comment 2 Michal Prívozník 2024-11-04 14:35:34 UTC
Huh, spoke too soon.  Apparently 'start-stop-daemon --background' returns success even when the daemon fails to start. Guess we'll need to patch qemu-ga sources anyway.