[lxc/lxc] 3764c1: Add suppport for PuzzleFS images in the oci template

0 views
Skip to first unread message

Serge Hallyn

unread,
Oct 5, 2024, 8:12:51 PMOct 5
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: 3764c19967286a9cb193485fadec3181c62fe241
https://github.com/lxc/lxc/commit/3764c19967286a9cb193485fadec3181c62fe241
Author: Ariel Miculas-Trif <amic...@cisco.com>
Date: 2024-10-04 (Fri, 04 Oct 2024)

Changed paths:
M templates/lxc-oci.in

Log Message:
-----------
Add suppport for PuzzleFS images in the oci template

PuzzleFS images (media type 'application/vnd.puzzlefs.image.rootfs.v1')
can be mounted in a similar way to squashfs images, we just have to
detect the type and reuse the existing code for providing a mount
helper. PuzzleFS is a next-generation container filesystem [1] with
several benefits, such as reduced duplication, reproducible image
builds, direct mounting support and memory safety guarantees.

Since PuzzleFS currently doesn't provide an image config, also add
support for empty image configs, they are supported by the OCI spec [2].

The MOUNT_HELPER is now passed a `--persist <upperdir>` flag, so it
knows that it needs to create an overlay. This is needed because LXC
expects a writable rootfs and both atomfs and puzzlefs are read-only
filesystems.

Example:
```
$ sudo env PATH=$PATH build/src/lxc/tools/lxc-create --name mycontainer -t \
oci -- --url oci:/$HOME/.local/share/puzzlefs/pfs_ubuntu:eg --no-cache

$ sudo build/src/lxc/tools/lxc-start --name mycontainer --foreground /bin/bash
```

--no-cache is needed for puzzlefs until [3] is solved

[1] https://github.com/project-machine/puzzlefs
[2] https://github.com/opencontainers/image-spec/blob/main/manifest.md#image-manifest
[3] https://github.com/project-machine/puzzlefs/issues/131

Signed-off-by: Ariel Miculas-Trif <amic...@cisco.com>


Commit: bf33e9bc54ec06267077730ca5e654d3119de82e
https://github.com/lxc/lxc/commit/bf33e9bc54ec06267077730ca5e654d3119de82e
Author: Serge Hallyn <se...@hallyn.com>
Date: 2024-10-05 (Sat, 05 Oct 2024)

Changed paths:
M templates/lxc-oci.in

Log Message:
-----------
Merge pull request #4483 from ariel-miculas/support_puzzlefs

Add suppport for PuzzleFS images in the oci template


Compare: https://github.com/lxc/lxc/compare/aca49b95251d...bf33e9bc54ec

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages