From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Trevor Woerner <twoerner@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v3 09/11] image_types_wic.bbclass: capture verbose wic output by default
Date: Tue, 15 Apr 2025 08:19:59 +0300 [thread overview]
Message-ID: <Z_3sf3l8VmiXjfi_@nuoska> (raw)
In-Reply-To: <20250414204357.GA9290@localhost>
Hi,
On Mon, Apr 14, 2025 at 04:43:58PM -0400, Trevor Woerner wrote:
> On Fri 2025-04-04 @ 07:29:30 PM, Mikko Rapeli via lists.openembedded.org wrote:
> > Call wic with --debug to capture logs from wic internals
> > so that it's clear which partitions get created and which
> > files get copied where. wic plugins contain for example
> > race conditions which don't install files at all and thus
> > images fail to boot and it's not possible to debug these without
> > something in wic task logs.
> >
> > For example core-image-initramfs-boot do_image_wic
> > log is now 576 lines which is not excessive but very
> > important when debugging problems, especially race
> > conditions which are only hit in some builds in CI.
> >
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> > ---
> > meta/classes-recipe/image_types_wic.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/classes-recipe/image_types_wic.bbclass b/meta/classes-recipe/image_types_wic.bbclass
> > index 1b422b6280..10888bc12b 100644
> > --- a/meta/classes-recipe/image_types_wic.bbclass
> > +++ b/meta/classes-recipe/image_types_wic.bbclass
> > @@ -72,7 +72,7 @@ IMAGE_CMD:wic () {
> > if [ -z "$wks" ]; then
> > bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > fi
> > - BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS}
> > + BUILDDIR="${TOPDIR}" PSEUDO_UNLOAD=1 wic create --debug "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$build_wic/" -w "$tmp_wic" ${WIC_CREATE_EXTRA_ARGS}
> >
> > # look to see if the user specifies a custom imager
> > IMAGER=direct
>
> When I need to debug a wic issue, I add "--debug" to WIC_CREATE_EXTRA_ARGS in
> my conf/local.conf, debug the issue, then submit the patch which modifies the
> layer without any debugging remnants left behind. I can then either leave wic
> debugging turned on, or turn it off for my builds as I see fit. Turning on
> debugging by default for everyone using wic is not what we should be doing.
> It will slow down builds, and will inflate log files... by miniscule amounts,
> sure, but not the direction we should be taking.
I just disagree. Default logging should not be excessive but logs should
show at high level what the task and tools executed there are doing.
wic logs without --debug are completely useless in understanding what
happened when image was created. wic logs with --debug are not excessive
but show which partitions got created and which files copied where.
Full rootfs content is not shown so logging is not excessive.
> If you feel there are messages that should be logged on every wic invocation
> (on which I doubt there will be consensus) then they should be moved out from
> behind a --debug flag. The whole point of a debug flag is to identify messages
> that do not need to be logged on every build, but only under special
> circumstances. Lots of software projects have debug flags; I can't think of any
> that turn their debug flags on by default.
I want to see which files wic copies and where, e.g. ESP boot partition, and
which partitions it created. Without --debug wic does not log these.
Some people want all logs to be empty by default, I want them to be usable
when things go wrong in builds which I did not start or even fully control.
Cheers,
-Mikko
next prev parent reply other threads:[~2025-04-15 5:20 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-04 16:29 [PATCH v3 00/11] systemd based initrd and modular kernel support Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 01/11] systemd: enable efi support by default Mikko Rapeli
2025-04-10 10:16 ` [OE-core] " Adrian Freihofer
2025-04-10 11:12 ` Mikko Rapeli
2025-04-10 11:45 ` Ilias Apalodimas
2025-04-10 12:12 ` Ilias Apalodimas
2025-04-10 17:44 ` Alexander Kanavin
2025-04-10 17:48 ` Ilias Apalodimas
2025-04-10 19:19 ` Alexander Kanavin
2025-04-11 10:56 ` Ilias Apalodimas
2025-04-10 20:53 ` Adrian Freihofer
2025-04-11 10:38 ` Ilias Apalodimas
2025-04-10 12:13 ` Alexander Kanavin
2025-04-10 12:54 ` Ilias Apalodimas
2025-04-10 14:20 ` Alexander Kanavin
2025-04-10 14:38 ` Ilias Apalodimas
2025-04-10 14:51 ` Alexander Kanavin
2025-04-10 15:16 ` Ilias Apalodimas
2025-04-10 15:27 ` Mikko Rapeli
2025-04-11 8:40 ` Mike Looijmans
2025-04-11 10:45 ` Mikko Rapeli
2025-04-11 11:08 ` mike.looijmans
2025-04-14 16:28 ` Adrian Freihofer
2025-04-15 9:51 ` Mikko Rapeli
2025-04-15 10:39 ` Jose Quaresma
2025-04-15 16:20 ` Peter Kjellerstedt
2025-04-16 6:08 ` Mikko Rapeli
2025-04-16 9:07 ` Koen Kooi
2025-04-16 10:10 ` Adrian Freihofer
2025-04-16 12:54 ` Peter Kjellerstedt
2025-04-04 16:29 ` [PATCH v3 02/11] uki.bbclass: drop serial console from kernel command line Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 03/11] kernel.bbclass: add kernel-initrd-modules meta package Mikko Rapeli
2025-04-08 3:42 ` [OE-core] " Bruce Ashfield
2025-04-10 12:42 ` Richard Purdie
2025-04-10 13:00 ` Mikko Rapeli
2025-04-10 13:15 ` Bruce Ashfield
2025-04-11 7:48 ` Mikko Rapeli
2025-04-11 12:52 ` Bruce Ashfield
2025-04-11 13:12 ` Mikko Rapeli
2025-04-11 13:39 ` Bruce Ashfield
2025-04-11 13:45 ` Richard Purdie
2025-04-22 10:18 ` Mikko Rapeli
2025-04-23 12:48 ` Bruce Ashfield
[not found] ` <1834F69070219745.7383@lists.openembedded.org>
2025-04-11 8:07 ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 04/11] core-image-initramfs-boot: add option to build systemd based initrd Mikko Rapeli
2025-04-07 6:01 ` [OE-core] " Koen Kooi
2025-04-07 6:12 ` Mikko Rapeli
2025-04-07 8:58 ` Koen Kooi
2025-04-07 9:08 ` Mikko Rapeli
2025-04-10 12:45 ` Richard Purdie
2025-04-10 13:05 ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 05/11] core-image-initramfs-boot: don't install RRECOMMENDS to reduce size Mikko Rapeli
2025-04-10 12:47 ` [OE-core] " Richard Purdie
2025-04-10 13:09 ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 06/11] core-image-initramfs-boot: install kernel-initrd-modules by default Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 07/11] oeqa selftest uki.py: add aarch64/arm test with systemd based initrd Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 08/11] test_efi_plugin_plain_systemd-boot: don't set console Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 09/11] image_types_wic.bbclass: capture verbose wic output by default Mikko Rapeli
2025-04-14 20:43 ` [OE-core] " Trevor Woerner
2025-04-15 5:19 ` Mikko Rapeli [this message]
2025-04-22 14:25 ` Alexander Kanavin
2025-04-04 16:29 ` [PATCH v3 10/11] wic bootimg-efi.py: fail build if no binaries installed Mikko Rapeli
2025-04-14 20:51 ` [OE-core] " Trevor Woerner
2025-04-15 5:03 ` Mikko Rapeli
2025-04-04 16:29 ` [PATCH v3 11/11] image_types_wic.bbclass: depend on grub-efi and systemd-boot on aarch64, systemd-boot on arm Mikko Rapeli
2025-04-14 20:48 ` [OE-core] " Trevor Woerner
2025-04-15 5:01 ` Mikko Rapeli
2025-04-07 7:53 ` [OE-core] [PATCH v3 00/11] systemd based initrd and modular kernel support Mathieu Dubois-Briand
2025-04-07 8:10 ` Mikko Rapeli
2025-04-07 8:51 ` Mathieu Dubois-Briand
2025-04-07 9:24 ` Mikko Rapeli
2025-04-07 9:52 ` Mathieu Dubois-Briand
2025-04-07 10:26 ` Mikko Rapeli
[not found] ` <18340261181AE46F.21691@lists.openembedded.org>
2025-04-07 11:13 ` Mikko Rapeli
2025-04-08 11:26 ` Mathieu Dubois-Briand
2025-04-08 11:39 ` Mikko Rapeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z_3sf3l8VmiXjfi_@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=twoerner@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox