1
0
mirror of https://github.com/systemd/systemd synced 2024-07-01 07:34:28 +00:00
systemd/test/TEST-50-DISSECT
Luca Boccassi a1a40297db core: deduplicate identical dm-verity ExtensionImages=
It turns out OverlayFS doesn't handle gracefully when the same source is
specified multiple times in lowerdir= and it fails with ELOOP:

Failed to mount overlay (type overlay) on /run/systemd/mount-rootfs/opt (MS_RDONLY "lowerdir=/run/systemd/unit-extensions/1/opt:/run/systemd/unit-extensions/0/opt:/run/systemd/mount-rootfs/opt"): Too many levels of symbolic links

This happens even if we mount each image in a different internal mount
path, as OverlayFS will resolve it and look for the backing device, which
will be the same device mapper entity, and return a hard error.
This error does not appear if dm-verity is not used, so it is very
confusing for users, and unnecessary.

When mounting ExtensionImages, check if an image is dm-veritied,
and drop duplicates if the root hashes match, to avoid this user-unfriendly
hard error.
2024-06-28 14:37:58 +01:00
..
Makefile dissect: support single-filesystem verity images with external verity hash 2020-06-09 12:19:21 +01:00
meson.build test: Run tests that don't need a vm in systemd-nspawn 2024-05-29 14:10:50 +02:00
test.sh core: deduplicate identical dm-verity ExtensionImages= 2024-06-28 14:37:58 +01:00