Skip to content

feat: add requirements.ephemeral_data_disk - #1461

Merged
kvinwang merged 2 commits into
nextfrom
feat/ephemeral-data-disk
Oct 22, 2026
Merged

kvinwang merged 2 commits into
nextfrom
feat/ephemeral-data-disk

Conversation

@kvinwang

@kvinwang kvinwang commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Some apps need every boot to start from a clean data disk, so that no state from an earlier boot (or a copy the host rolled back) is visible to app code. Right now the guest always reuses whatever filesystem it finds on the data disk.

Fix

Add an opt-in requirements.ephemeral_data_disk field (default false) to app-compose.json.

  • guest: when this is set, mount_data_disk skips detection and always initializes the disk: it runs a fresh luksFormat (new random volume key, which makes the old ciphertext unreadable), clears stale ZFS labels, and creates the filesystem. This all happens before any app code runs.
  • sdk: Go, JS and Python add the typed field. As with health_check, false is omitted from the output, so compose hashes for existing apps do not change.

The field sits under requirements, so it needs manifest_version: "3". Older guests reject it, so they fail closed instead of ignoring it.

The VMM is deliberately left out. Replacing hda.img on the host would rule out a later option that keeps named volumes across boots.

@kvinwang
kvinwang force-pushed the feat/ephemeral-data-disk branch from 68c9d6a to 3d429ee Compare October 22, 2026 01:53
Signed-off-by: Kevin Wang <wy721@qq.com>
Signed-off-by: Kevin Wang <wy721@qq.com>
@kvinwang
kvinwang force-pushed the feat/ephemeral-data-disk branch from 3d429ee to 01637c3 Compare October 22, 2026 02:42
@kvinwang
kvinwang merged commit 05d50dc into next Oct 22, 2026
12 checks passed
@kvinwang
kvinwang deleted the feat/ephemeral-data-disk branch October 22, 2026 03:30
@kvinwang
kvinwang requested a review from Leechael October 22, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant