all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Filip Schauer <f.schauer@proxmox.com>
To: copystring <copystring@gmail.com>, pve-devel@lists.proxmox.com
Subject: Re: [RFC PATCH 0/4] lxc: add safe OCI rootfs replacement
Date: Tue, 14 Jul 2026 15:23:57 +0200	[thread overview]
Message-ID: <7d51cde8-6d16-49d4-8f07-60cb67a09cf9@proxmox.com> (raw)
In-Reply-To: <20260706194059.280257-1-copystring@gmail.com>

On 09/07/2026 10:21, copystring wrote:
> This RFC adds an explicit rootfs replacement path for stopped LXC containers
> created from OCI images. The intent is to support the common "refresh the OCI
> image" workflow without pretending that data stored inside the old rootfs can be
> merged safely.
>
> The safety model is intentionally conservative:
>
> * require an explicit confirmation parameter;
> * only operate on stopped, non-template, non-HA, unprotected CTs without
>    snapshots or pending config changes;
> * only replace the active rootfs volume, while preserving mpX mount points;
> * keep the previous rootfs as an unusedX volume instead of deleting it;
> * fail if no unusedX slot is available;
> * never remove the newly allocated rootfs once config writing has started;
> * do not use overlayfs or path heuristics such as /config or /data detection;
> * reject shrink-like requests by requiring the target size to be at least the
>    current rootfs size.
>
> This means data that only exists on / becomes data on the old unused volume, not
> on the new active rootfs. Users are expected to keep persistent application data
> on separate mount points or to have a backup before replacing the rootfs.
>
> By default, the endpoint also updates OCI-derived runtime config such as
> entrypoint, environment, ostype, arch and OCI-generated lxc keys. A caller can
> set update-oci-config=0 to preserve the existing runtime config and only switch
> the rootfs.

Thanks for putting this together.

For context: I am working on improving the current OCI container tech
preview by adding OverlayFS-based storage, so that image layers are
stored once (content-addressed & deduplicated) and mounted as read-only
lower layers under a thin writable upper layer, rather than being
squashed into a single rootfs volume per container.
I just posted my proposal as a separate RFC:
https://lore.proxmox.com/pve-devel/5709a436-fb72-4fa5-8bdc-702c3e96a5a7@proxmox.com/

Your series creates a clean new rootfs volume and extracts a fresh copy
of an image. This makes sense given that local changes cannot be safely
merged.

In the OverlayFS model, the equivalent would be to allocate a fresh
empty `overlay` volume (just the upperdir and workdir) and point it at a
new image digest as its `ocibase`. That would be cheap since no layers
need re-extracting.

Looking at your patch series, it seems like your replacement API could
be a good approach for migrating existing squashed-rootfs containers to
the new OverlayFS model aswell. If a user wants to update an existing
OCI container, they could use this API. Under the hood, instead of
extracting the OCI image into a new squashed volume, we would allocate a
new `overlay` volume and set its `ocibase`.

Because of this overlap, it would be great to align our efforts. Once
the OverlayFS implementation takes shape, your series could be
adapted/extended to generate the `overlay` volumes instead.

Thanks,
Filip





      parent reply	other threads:[~2026-07-14 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 19:40 SPAM: [RFC PATCH 0/4] lxc: add safe OCI rootfs replacement copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH 1/4] lxc: create: add isolated OCI rootfs preparation copystring
2026-07-15 12:02   ` Filip Schauer
2026-07-06 19:40 ` SPAM: [RFC PATCH 2/4] api: lxc: add OCI rootfs replacement endpoint copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH 3/4] pct: add OCI rootfs replacement command copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH 4/4] test: cover OCI rootfs replacement API transaction copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH pve-manager] lxc: add OCI rootfs replacement window copystring
2026-07-06 19:40 ` SPAM: [RFC PATCH pve-docs] pct: document OCI rootfs replacement semantics copystring
2026-07-14 13:23 ` Filip Schauer [this message]

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=7d51cde8-6d16-49d4-8f07-60cb67a09cf9@proxmox.com \
    --to=f.schauer@proxmox.com \
    --cc=copystring@gmail.com \
    --cc=pve-devel@lists.proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal