Files
containerd/plugins
AprilNEA 5e25f36e5e overlay: don't override a configured index mount option
NewSnapshotter auto-appends "index=off" unless the configured
mount_options already carry an index option — but the check used
hasOption(..., "index", false), which compares against the literal
string "index". No valid mount option ever equals "index" (it is
always valued, "index=on"/"index=off"), so the append happened
unconditionally whenever the kernel exposes the overlay index
parameter.

Mount options are last-wins in the kernel, so a user-configured
"index=on" was silently overridden. Worse, configuring
mount_options = ["index=on", "nfs_export=on"] (the documented way to
make overlay mounts NFS-exportable) produced
"index=on,nfs_export=on,index=off", which the kernel rejects with
EINVAL (nfs_export=on conflicts with an explicit index=off) — breaking
every snapshot mount including image unpack.

Make hasOption match the key of a "key[=value]" option so callers need
not care whether the option takes a value, and add a regression test.

Signed-off-by: AprilNEA <github@sku.moe>
2026-07-17 16:04:32 +08:00
..
2026-03-15 18:24:15 +01:00
2026-03-15 18:24:15 +01:00
2026-03-15 18:24:15 +01:00
2026-03-15 18:24:15 +01:00
2026-07-04 12:08:50 -04:00
2026-07-04 12:08:50 -04:00
2026-03-15 18:24:15 +01:00
2026-03-15 18:24:15 +01:00
2026-03-15 18:24:15 +01:00
2026-04-21 18:02:40 -07:00