From: Anton Mikanovich <amikan@ilbers.de>
To: Florian Bezdeka <florian.bezdeka@siemens.com>,
isar-users@googlegroups.com
Cc: Jan Kiszka <jan.kiszka@siemens.com>, Baurzhan Ismagulov <ibr@ilbers.de>
Subject: Re: [PATCH] meta: Drop lazy and recursive unmounts
Date: Thu, 29 Aug 2024 12:26:07 +0300 [thread overview]
Message-ID: <9ecb2ac7-9abd-4782-8498-7c5216fc99ca@ilbers.de> (raw)
In-Reply-To: <dccfd6b9e590e3429f74a990648e27c4d5e25ff8.camel@siemens.com>
28/08/2024 16:05, Florian Bezdeka wrote:
> Hi all,
>
> I'm not 100% sure, but it seems I'm facing some problems with this
> patch. I know about the situation that we sporadically saw some
> mounting issues and that patch tries to expose such issues.
>
> At least my issue seems to reproduce to 100%...
>
> See below...
>
> On Wed, 2024-06-19 at 13:41 +0300, Anton Mikanovich wrote:
>> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
>> index faf22a50..6bc667e7 100644
>> --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
>> +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
>> @@ -341,7 +341,7 @@ do_bootstrap() {
>> echo "deb-src ${line}" >> "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list"
>>
>> mkdir -p ${ROOTFSDIR}/base-apt
>> - mount --bind ${REPO_BASE_DIR} ${ROOTFSDIR}/base-apt
>> + mount -o bind,private "${REPO_BASE_DIR}" "${ROOTFSDIR}/base-apt"
>> else
>> install -v -m644 "${APTSRCS}" \
>> "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list"
>> @@ -378,10 +378,10 @@ do_bootstrap() {
>>
>> # update APT
>> mount -o bind,private /dev ${ROOTFSDIR}/dev
> That means that we mount /dev from "the host" into the rootfs/chroot
> environment, right? "Submounts included", no?
>
> I'm facing the following error with that. The isar build is executed
> inside a container / pod running on a k8s cluster.
>
> Inside the container the following steps are executed:
>
> build-bookworm:
> script:
> - kas build <path-to-kas-file>
> - sudo rm -rf build/tmp/work/debian-bookworm-amd64/buildchroot-target
>
> The rm command triggers the following errors:
>
> rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/shm': Device or resource busy
> rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/termination-log': Device or resource busy
> rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/mqueue': Device or resource busy
> rm: cannot remove 'build/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev/pts': Device or resource busy
>
> My assumption is that isar is not cleaning up all mounts. I think the
> interesting part is about /dev/termination-log.
> That device is mounted into the pod by the k8s infrastructure.
>
> I think we should never mount that into the chroot, or make sure it is
> properly unmounted again...
>
> Any thoughts on that? Any additional information needed?
>
> Florian
Hello Florian,
The line you are pointing to is inside isar-bootstrap preparations,
while your
error is pointing to busy mountpoints in sbuild-chroot, managed by
rootfs.bbclass.
Anyway private mount private mount does not forward or receive
propagations. It means no external submounts will be mounted inside
rootfs and
no Isar mounts will be mounted to external /dev.
Can you check which mountpoints are left after the build (before rm)?
--
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 on the web visit https://groups.google.com/d/msgid/isar-users/9ecb2ac7-9abd-4782-8498-7c5216fc99ca%40ilbers.de.
next prev parent reply other threads:[~2024-08-29 9:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 10:41 Anton Mikanovich
2024-06-26 6:31 ` Uladzimir Bely
2024-08-28 13:05 ` 'Florian Bezdeka' via isar-users
2024-08-29 9:26 ` Anton Mikanovich [this message]
2024-08-29 12:26 ` 'Florian Bezdeka' via isar-users
2024-09-06 14:34 ` Anton Mikanovich
2024-10-01 11:59 ` 'Florian Bezdeka' via isar-users
2024-10-01 12:14 ` 'Jan Kiszka' via isar-users
2024-10-01 12:18 ` 'Florian Bezdeka' via isar-users
2024-10-01 12:28 ` 'Jan Kiszka' via isar-users
2024-10-03 14:37 ` Baurzhan Ismagulov
2024-10-04 7:28 ` 'Florian Bezdeka' via isar-users
2024-10-04 8:00 ` Uladzimir Bely
2024-10-04 8:16 ` 'Jan Kiszka' via isar-users
2024-10-10 4:33 ` 'Jan Kiszka' via isar-users
2024-10-10 9:43 ` Baurzhan Ismagulov
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=9ecb2ac7-9abd-4782-8498-7c5216fc99ca@ilbers.de \
--to=amikan@ilbers.de \
--cc=florian.bezdeka@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