On Tue, 2017-12-05 at 16:52 +0000, Daniel P. Berrange wrote:
On Tue, Dec 05, 2017 at 10:53:17AM +0100, Cédric Bosdonnat wrote:
> libvirt-sandbox-init-common is expecting -d and -v parameters to
> set it in debug or verbose mode... but those will never be passed
> by the launcher program.
Hmm, libvirt-sandbox-init-{qemu,lxc} both know how to pass -d
to init-common. If either of the virt specific init programs
are in debug mode (as indicated by the word "debug" in kernel
command line or equiv), then they pass -d to init-common.
Hum, then I should surely revise that commit to remove the debug-related
code. Instead I should change the init-{lxc,qemu} to actually pass
the debug flag to init-common.
You're right that there's no way to pass -v though.
Also, it might be useful to run init-common in debug mode
without the virt specific init being in debug mode, to avoid
drowning in debug.
Hum, then keeping the debug-related flag I introduced could help,
but then I'll need to rename it to make it more explicit. Or maybe
I should change the debug parameter to take a level value:
0: all (default)
1: only the init-common
In which case the user-exposed options should be expanded to use these.
I'll push the other commits, but not this one.
--
Cedric
>
> Writing the core.debug and core.verbose parameters in the sandbox
> configuration makes those values actually usable from the init.
> ---
> bin/virt-sandbox.c | 3 ++
> libvirt-sandbox/libvirt-sandbox-config.c | 75 +++++++++++++++++++++++++++
> libvirt-sandbox/libvirt-sandbox-config.h | 6 +++
> libvirt-sandbox/libvirt-sandbox-init-common.c | 3 ++
> libvirt-sandbox/libvirt-sandbox.sym | 4 ++
> 5 files changed, 91 insertions(+)
Reviewed-by: Daniel P. Berrange <berrange(a)redhat.com>
if the commit message is fixed
Regards,
Daniel