public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Zhihang Wei <wzh@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
	isar-users <isar-users@googlegroups.com>,
	Felix Moessbauer <felix.moessbauer@siemens.com>,
	Anton Mikanovich <amikan@ilbers.de>
Cc: Cedric Hombourger <cedric.hombourger@siemens.com>,
	Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: [PATCH] rootfs: Restore previous naming scheme in INITRD_DEPLOY_FILE
Date: Fri, 12 Dec 2025 15:36:11 +0100	[thread overview]
Message-ID: <0d2f69c8-8376-43b5-9f64-0a0b80cce73d@ilbers.de> (raw)
In-Reply-To: <762c89af-744f-40d6-80eb-e9aa7b35630a@siemens.com>



On 12/12/25 11:29, Jan Kiszka wrote:
> On 11.12.25 17:39, 'Jan Kiszka' via isar-users wrote:
>> On 11.12.25 17:09, Zhihang Wei wrote:
>>>
>>> On 12/11/25 14:53, 'Jan Kiszka' via isar-users wrote:
>>>> On 09.12.25 11:15, Zhihang Wei wrote:
>>>>> It cause a wired bug in full CI, when building the target
>>>>> 'mc:qemuamd64-iso-bookworm:isar-image-ci' under the test case:
>>>>> - citest.py:NoCrossTest.test_nocross
>>>>> Error log from avocado:
>>>>> ERROR: mc:qemuamd64-iso-bookworm:isar-image-ci-1.0-r0 do_image_wic:
>>>>> ExecutionError('/work/build/tmp/work/debian-bookworm-amd64/isar-image-
>>>>> ci-qemuamd64-iso/1.0-r0/temp/run.do_image_wic.231803', 1, None, None)
>>>>> ERROR: Logfile of failure stored in: /work/build/tmp/work/debian-
>>>>> bookworm-amd64/isar-image-ci-qemuamd64-iso/1.0-r0/temp/
>>>>> log.do_image_wic.231803
>>>>> ERROR: Task (mc:qemuamd64-iso-bookworm:/work/meta-test/recipes-core/
>>>>> images/isar-image-ci.bb:do_image_wic) failed with exit code '1'
>>>>> Error log from the failed task:
>>>>> DEBUG: Executing python function set_image_size
>>>>> DEBUG: Python function set_image_size finished
>>>>> DEBUG: Executing shell function do_image_wic
>>>>> Creating /etc/schroot/chroot.d/isar-builder-50e1b98f-a270-4654-bbe8-
>>>>> a40664e9bf72-231803
>>>>> Started session: isar-builder-50e1b98f-a270-4654-bbe8-
>>>>> a40664e9bf72-231803-f762d345-e215-4bb7-98ba-63ad30c6c51c
>>>>> <snip>
>>>>> Setting up grub-common (2.06-13+deb12u1) ...
>>>>> Setting up grub-efi-amd64-bin (2.06-13+deb12u1) ...
>>>>> Processing triggers for libc-bin (2.36-9+deb12u13) ...
>>>>> Processing triggers for man-db (2.11.2-2) ...
>>>>> INFO: Creating image(s)...
>>>>> ERROR: _exec_cmd: cd /tmp/isar-image-ci-debian-bookworm-qemuamd64-
>>>>> iso.wic/tmp.wic.0y6e0rtx/INITRD && find . | cpio -o -H newc -R root:root
>>>>>> /tmp/isar-image-ci-debian-bookworm-qemuamd64-iso.wic/tmp.wic.0y6e0rtx/
>>>>> initrd.cpio returned '127' instead of 0
>>>>> output: /bin/sh: 1: cpio: not found
>>>>> To redo the test using avocado:
>>>>> 1. Have a clean clone of isar, checkout to branch next and apply your
>>>>> patches:
>>>>> $ git clone -b next https://github.com/ilbers/isar.git
>>>>> $ cd isar
>>>>> $ git am /path-to/0001-my-contribution-to-isar.patch
>>>>> 2. Disable unrelated targets to make error appears faster, by applying
>>>>> the following diff to "testsuite/citest.py":
>>>>> diff --git a/testsuite/citest.py b/testsuite/citest.py
>>>>> index 27cc9ff6..8dd40d62 100755
>>>>> --- a/testsuite/citest.py
>>>>> +++ b/testsuite/citest.py
>>>>> @@ -494,36 +494,7 @@ class NoCrossTest(CIBaseTest):
>>>>> def test_nocross(self):
>>>>> targets = [
>>>>> - 'mc:qemuarm-buster:isar-image-ci',
>>>>> - 'mc:qemuarm-bullseye:isar-image-base',
>>>>> - 'mc:qemuarm64-bullseye:isar-image-base',
>>>>> - 'mc:qemuarm64-bookworm:isar-image-ci',
>>>>> - 'mc:qemui386-buster:isar-image-base',
>>>>> - 'mc:qemui386-bullseye:isar-image-base',
>>>>> - 'mc:qemuamd64-buster:isar-image-ci',
>>>>> - 'mc:qemuamd64-bullseye:isar-initramfs',
>>>>> - 'mc:qemumipsel-bullseye:isar-image-base',
>>>>> - 'mc:imx6-sabrelite-bullseye:isar-image-base',
>>>>> - 'mc:phyboard-mira-bullseye:isar-image-base',
>>>>> - 'mc:hikey-bullseye:isar-image-base',
>>>>> - 'mc:virtualbox-bullseye:isar-image-base',
>>>>> - 'mc:virtualbox-bookworm:isar-image-base',
>>>>> - 'mc:bananapi-bullseye:isar-image-base',
>>>>> - 'mc:bananapi-bookworm:isar-image-base',
>>>>> - 'mc:nanopi-neo-bullseye:isar-image-base',
>>>>> - 'mc:nanopi-neo-bookworm:isar-image-base',
>>>>> - 'mc:qemuamd64-focal:isar-image-ci',
>>>>> - 'mc:qemuamd64-bookworm:isar-image-ci',
>>>>> 'mc:qemuamd64-iso-bookworm:isar-image-ci',
>>>>> - 'mc:qemui386-bookworm:isar-image-base',
>>>>> - 'mc:qemumipsel-bookworm:isar-image-ci',
>>>>> - 'mc:hikey-bookworm:isar-image-base',
>>>>> - 'mc:beagleplay-bookworm:isar-image-base',
>>>>> - 'mc:qemuarm64-noble:isar-image-base',
>>>>> - 'mc:qemuamd64-noble:isar-image-base',
>>>>> - 'mc:qemuamd64-jammy:isar-image-base',
>>>>> - 'mc:qemuarm64-jammy:isar-image-base',
>>>>> - 'mc:x86-pc-bookworm:isar-image-base',
>>>>> ]
>>>>> self.init()
>>>>> 3.Run kas shell, setup CI prerequisites (avocado, qemu) and cleanup:
>>>>> $ ./kas/kas-container shell kas/isar.yaml --command \
>>>>> "rm -rf /work/build/conf && /work/scripts/ci_setup.sh"
>>>>> 4.Run the failed test in fast:
>>>>> $ cd /work/testsuite
>>>>> $ avocado run citest.py:NoCrossTest.test_nocross$
>>>>> Zhihang
>>>>> On 11/29/25 16:13, Jan Kiszka wrote:
>>>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>>
>>>>>> Might have been accidentally changed, specifically as initramfs.bbclass
>>>>>> was not updated as well, and that broke downstream users of
>>>>>> INITRD_DEPLOY_FILE via wic.
>>>>>>
>>>>>> Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate
>>>>>> INITRD_IMAGE")
>>>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>>>> ---
>>>>>>     meta/classes/image.bbclass | 2 +-
>>>>>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>>>> index b030024f..d367d8c7 100644
>>>>>> --- a/meta/classes/image.bbclass
>>>>>> +++ b/meta/classes/image.bbclass
>>>>>> @@ -29,7 +29,7 @@ INITRD_IMAGE ?= ""
>>>>>>     IMAGE_INITRD ?= ""
>>>>>>       # Name of the deployed initrd image
>>>>>> -INITRD_DEPLOY_FILE = "${@ d.getVar('IMAGE_INITRD') or '${PN}' }-
>>>>>> ${DISTRO}-${MACHINE}-initrd.img"
>>>>>> +INITRD_DEPLOY_FILE = "${@ d.getVar('IMAGE_INITRD') or '${PN}' }-
>>>>>> ${DISTRO}-${MACHINE}.initrd.img"
>>>>>>       # Make sure dependent initramfs recipe is built
>>>>>>     do_image[depends] += "${@ '${IMAGE_INITRD}:do_build' if
>>>>>> '${IMAGE_INITRD}' else '' }"
>>>> Did you understand that issue by now? The patch itself is still a
>>>> must-have to fix initrd generation in downstream layers.
>>>>
>>>> Jan
>>>>
>>> No. can you re-create the same issue on your side?
>>>
>> Let me try that tomorrow, wanted to "play" with the testsuite once again
>> anyway.
>>
> Still no fun (slow startup of the build env, need to patch the setup to
> run the test etc. etc.). Quickly translating the testsuite target into a
> proper kas configuration is way more enjoyable:
>
> kas-container build kas/isar.yaml:kas/machine/qemuamd64-iso.yaml:kas/distro/debian-bookworm.yaml:kas/image/isar-image-ci.yaml
>
> At this chance I noticed that isar's kas configuration is missing all
> the multiconfig targets you have, thus can't be fed with mc: targets
> directly. Needs fixing!
>
>
> Now to the actual bug: As expected, it was most likely a pre-existing
> one. I do not get yet why it was working before c3c4e72cbfc4, but maybe
> we are not entering a questionable code path in meta/scripts/lib/wic/
> plugins/source/isoimage-isohybrid-isar.py. Fixing that, we get things
> working again:
>
> diff --git a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
> index fb6c6b39..7e981a78 100644
> --- a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
> +++ b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
> @@ -194,7 +194,7 @@ class IsoImagePlugin(SourcePlugin):
>               machine = os.path.basename(initrd_dir)
>   
>               pattern = '%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type)
> -            pattern = '%s/%s-%s-initrd.%s' % (initrd_dir, image_name, machine, image_type)
> +            pattern = '%s/%s-%s.initrd.%s' % (initrd_dir, image_name, machine, image_type)
>               files = glob.glob(pattern)
>               if files:
>                   initrd = files[0]
>
> But that raises the question why we are duplicating INITRD_DEPLOY_FILE
> here, rather than using it. Maybe it was used before via setting the
> INITRD bitbar var, I still need to understand that. In any case, this
> pattern duplication in the wic plugin should be avoided, possibly even
> the whole code path. Felix, you introduced that.
>
> Jan
>
Just FYI, I'll be on vacation since 13.12.2025 until 11.01.2026. Anton 
will take the maintenance work during this time. Please add Anton to the 
relevant email threads if it's needed. I'll be back on 12.01.2025.

Zhihang

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/0d2f69c8-8376-43b5-9f64-0a0b80cce73d%40ilbers.de.

  reply	other threads:[~2025-12-12 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-29 15:13 'Jan Kiszka' via isar-users
2025-12-03 11:52 ` 'Quirin Gylstorff' via isar-users
2025-12-03 14:38   ` 'Quirin Gylstorff' via isar-users
2025-12-09 10:15 ` Zhihang Wei
2025-12-11 13:53   ` 'Jan Kiszka' via isar-users
2025-12-11 16:09     ` Zhihang Wei
2025-12-11 16:39       ` 'Jan Kiszka' via isar-users
2025-12-12 10:29         ` 'Jan Kiszka' via isar-users
2025-12-12 14:36           ` Zhihang Wei [this message]
2025-12-12 14:37             ` 'Jan Kiszka' via isar-users

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=0d2f69c8-8376-43b5-9f64-0a0b80cce73d@ilbers.de \
    --to=wzh@ilbers.de \
    --cc=amikan@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=ibr@ilbers.de \
    --cc=isar-users@googlegroups.com \
    --cc=jan.kiszka@siemens.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