Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810628 - app-emulation/qemu-guest-agent-6.0.0 startup script shows no error despite failure
Summary: app-emulation/qemu-guest-agent-6.0.0 startup script shows no error despite fa...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-27 07:59 UTC by PetaMem R&D
Modified: 2024-12-05 16:48 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.