* [PATCH 0/2] Protect parallel image building
@ 2021-12-28 6:29 Anton Mikanovich
2021-12-28 6:29 ` [PATCH 1/2] image: Make mount points imagetype-specific Anton Mikanovich
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-12-28 6:29 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
This is just a stabilization change for the next release. It is needed
to make multiconfigs with the same machine and distro, but different
image types, work in parallel with one bitbake call.
Anton Mikanovich (2):
image: Make mount points imagetype-specific
image: Protect shared deploy directory usage
meta/classes/image.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] image: Make mount points imagetype-specific
2021-12-28 6:29 [PATCH 0/2] Protect parallel image building Anton Mikanovich
@ 2021-12-28 6:29 ` Anton Mikanovich
2021-12-28 6:29 ` [PATCH 2/2] image: Protect shared deploy directory usage Anton Mikanovich
2022-01-10 7:50 ` [PATCH 0/2] Protect parallel image building Anton Mikanovich
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-12-28 6:29 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
When building two multiconfigs of the same target with different image
types they will share deploy, rootfs and work buildchrot mountpoints
with the same names. This can cause the following error:
DEBUG: Executing shell function do_cpiogz_image
/usr/bin/find: failed to read file names from file system at or below '.': No such file or directory
799078 blocks
ERROR: [Errno 2] No such file or directory: 'tmp/work/debian-buster-amd64/isar-image-base-qemuamd64-cpiogz-img/1.0-r0/temp/fifo.17814'
To fix the issue mountpoints should be splitted based on the image
suffix.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
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 e98856b..bd58056 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -28,7 +28,7 @@ INITRD_IMAGE ?= "${IMAGE_FULLNAME}-initrd.img"
DTB_FILES ?= ""
# Useful variables for imager implementations:
-PP = "/home/builder/${PN}"
+PP = "/home/builder/${PN}-${IMAGE_SUFFIX}"
PP_DEPLOY = "${PP}/deploy"
PP_ROOTFS = "${PP}/rootfs"
PP_WORK = "${PP}/work"
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] image: Protect shared deploy directory usage
2021-12-28 6:29 [PATCH 0/2] Protect parallel image building Anton Mikanovich
2021-12-28 6:29 ` [PATCH 1/2] image: Make mount points imagetype-specific Anton Mikanovich
@ 2021-12-28 6:29 ` Anton Mikanovich
2022-01-10 7:50 ` [PATCH 0/2] Protect parallel image building Anton Mikanovich
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2021-12-28 6:29 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Image deployment directory is shared between the targets with the same
machine name, but there was no any protection when copy bootables with
the same file names. So building multiconfig qemuamd64 targets can fail
with:
ERROR: mc:qemuamd64-buster-tgz:isar-image-base-1.0-r0 do_copy_boot_files:
Execution of 'tmp/work/debian-buster-amd64/isar-image-base-qemuamd64-targz-img/1.0-r0/temp/run.do_copy_boot_files.31554' failed with exit code 1:
cp: cannot create regular file 'tmp/deploy/images/qemuamd64/isar-image-base-debian-buster-qemuamd64-initrd.img': File exists
This is caused by initrd file creation by the multiple
do_copy_boot_files instances.
To fix the issue additional lock introduced.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/image.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index bd58056..a10f0d7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -139,6 +139,7 @@ EOF
}
do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}"
+do_copy_boot_files[lockfiles] += "${DEPLOY_DIR_IMAGE}/isar.lock"
do_copy_boot_files() {
kernel="$(realpath -q '${IMAGE_ROOTFS}'/vmlinu[xz])"
if [ ! -f "$kernel" ]; then
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Protect parallel image building
2021-12-28 6:29 [PATCH 0/2] Protect parallel image building Anton Mikanovich
2021-12-28 6:29 ` [PATCH 1/2] image: Make mount points imagetype-specific Anton Mikanovich
2021-12-28 6:29 ` [PATCH 2/2] image: Protect shared deploy directory usage Anton Mikanovich
@ 2022-01-10 7:50 ` Anton Mikanovich
2 siblings, 0 replies; 4+ messages in thread
From: Anton Mikanovich @ 2022-01-10 7:50 UTC (permalink / raw)
To: isar-users
28.12.2021 09:29, Anton Mikanovich wrote:
> This is just a stabilization change for the next release. It is needed
> to make multiconfigs with the same machine and distro, but different
> image types, work in parallel with one bitbake call.
>
> Anton Mikanovich (2):
> image: Make mount points imagetype-specific
> image: Protect shared deploy directory usage
>
> meta/classes/image.bbclass | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Applied to next.
--
Anton Mikanovich
Promwad Ltd.
External service provider of ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn, Germany
+49 (89) 122 67 24-0
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-10 7:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-28 6:29 [PATCH 0/2] Protect parallel image building Anton Mikanovich
2021-12-28 6:29 ` [PATCH 1/2] image: Make mount points imagetype-specific Anton Mikanovich
2021-12-28 6:29 ` [PATCH 2/2] image: Protect shared deploy directory usage Anton Mikanovich
2022-01-10 7:50 ` [PATCH 0/2] Protect parallel image building Anton Mikanovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox