public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Rebuild mount logic
@ 2021-05-08  6:25 Anton Mikanovich
  2021-05-08  6:25 ` [PATCH v3 1/5] dpkg: Make mount buildroot reliable Anton Mikanovich
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Anton Mikanovich @ 2021-05-08  6:25 UTC (permalink / raw)
  To: isar-users; +Cc: Anton Mikanovich

Mounting is perfomed very inconsistent currently in Isar. A lot of mount
points are left after task execution and stays mounted until cleanup in
build_completed hook.

We already experienced issues with stuck forever on unmounting at
"Couldn't unmount, retrying..." error.
It is also quite easy to face with a lot of ramaining mounts after the
failed or interrupted manual builds.

This patchset implements unmounting paths after usage. In the cases of
mount sharing corresponding request counting is performed, so real mount
will be done only at first request, real unmount will be done only after
the last task will try to unmount the path.

Meantime build_completed will use emergency only, so following warning
added to show something goes wrong.

---
Changes since v2:
- Prevent race conditions.
- Fix building qemuarm64-stretch.
- Minimize locks.
- Cleanup counter files.
- Unmount /proc/sys/fs/binfmt_misc also.
Changes since v1:
- Make all mounts be unmounted after use.
- Warn about lost mounts after finish.

Anton Mikanovich (5):
  dpkg: Make mount buildroot reliable
  buildchroot: Unmount buildchroot mounts if not needed
  rootfs: Unmount rootfs mounts if not needed
  wic: Unmount dirs after usage
  events: Warn if mounted paths left

 meta/classes/buildchroot.bbclass              |  47 +++++++
 meta/classes/dpkg-base.bbclass                | 127 +++++++++++-------
 meta/classes/dpkg-gbp.bbclass                 |   8 +-
 meta/classes/dpkg.bbclass                     |  14 +-
 meta/classes/ext4-img.bbclass                 |   2 +
 meta/classes/fit-img.bbclass                  |   2 +
 meta/classes/image-tools-extension.bbclass    |   2 +
 meta/classes/image.bbclass                    |  24 ++--
 meta/classes/initramfs.bbclass                |   2 +
 meta/classes/isar-events.bbclass              |   1 +
 meta/classes/rootfs.bbclass                   |  62 ++++++++-
 meta/classes/ubi-img.bbclass                  |   2 +
 meta/classes/ubifs-img.bbclass                |   2 +
 meta/classes/wic-img.bbclass                  |  10 ++
 .../buildchroot/buildchroot.inc               |   8 ++
 15 files changed, 232 insertions(+), 81 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-07-01 11:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  6:25 [PATCH v3 0/5] Rebuild mount logic Anton Mikanovich
2021-05-08  6:25 ` [PATCH v3 1/5] dpkg: Make mount buildroot reliable Anton Mikanovich
2021-06-08  8:09   ` Henning Schild
2021-06-08  8:31     ` Anton Mikanovich
2021-06-08  8:49       ` Henning Schild
2021-07-01 11:55   ` Jan Kiszka
2021-05-08  6:25 ` [PATCH v3 2/5] buildchroot: Unmount buildchroot mounts if not needed Anton Mikanovich
2021-05-08  6:25 ` [PATCH v3 3/5] rootfs: Unmount rootfs " Anton Mikanovich
2021-05-08  6:25 ` [PATCH v3 4/5] wic: Unmount dirs after usage Anton Mikanovich
2021-05-08  6:25 ` [PATCH v3 5/5] events: Warn if mounted paths left Anton Mikanovich
2021-07-01 11:51   ` Jan Kiszka
2021-06-08  7:58 ` [PATCH v3 0/5] Rebuild mount logic Henning Schild
2021-06-08  8:15   ` Anton Mikanovich
2021-06-08  8:42     ` Henning Schild
2021-06-08  8:54     ` Henning Schild
2021-06-10  7:12       ` Anton Mikanovich
2021-06-10 15:02         ` Henning Schild
2021-06-21 15:54 ` Jan Kiszka
2021-06-22 14:40   ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox