docs(tdx): warn that changing app-compose breaks the sealed disk - #3745
Conversation
Changing a running node's app-compose (scripts, UI edits, or memory/vCPU) alters the boot measurements the local-sgx key provider derives the disk key from, making the encrypted keyshare disk unrecoverable. Document why, call out the UI re-serialization footgun, and give the regenerate-and- update-app-compose recovery recipe. Refs #3742
Pull request overviewDocumentation-only change that adds a warning against modifying the app-compose of a running TDX node (which would rederive the LUKS disk key and prevent the node from starting), plus a Troubleshooting recipe to recover a bricked CVM by regenerating a byte-hash-identical app-compose. Motivated by the testnet incident on node 13 ( Changes:
Reviewed changesPer-file summary
FindingsBlocking (must fix before merge):
Non-blocking (nits, follow-ups, suggestions):
✅ Approved |
There was a problem hiding this comment.
Pull request overview
This PR updates the TDX external operator guide to clearly warn that modifying a CVM’s app-compose (including scripts/toggles and UI edits) changes measured boot inputs used to derive the sealed disk key under the local key provider, which can brick an existing encrypted data disk. It adds a prominent warning and a troubleshooting/recovery recipe based on a recent testnet incident.
Changes:
- Expands the “Pre-launch / Init Script” guidance to note scripts are measured and affect the disk-sealing key (not just attestation success).
- Adds a prominent
⚠️ callout warning operators not to change app-compose on a running node and pointing to recovery steps. - Adds a new troubleshooting section explaining symptoms, why it happens, and how to recover by restoring byte-identical measurements and re-applying app-compose.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|  | ||
|
|
||
| > **⚠️ Never change the app-compose of a running node** — the node will not be able to start, since the disk is encrypted with a key derived from the app-compose measurement. If this happens, see [Troubleshooting: node won't start after an app-compose change](#node-wont-start-after-an-app-compose-change) to recover. |
There was a problem hiding this comment.
Done in c8c5af6 — the callout now reads "Never change the app-compose (or the vCPU/memory) of a running node … a key derived from those measured inputs," so it no longer reads as app-compose-only.
…t; fix recovery commands to guide's $VMM_CLI_PATH/$VMM_URL/<vm-id> convention
Summary
Closes #3742.
Adds a warning + recovery recipe to the TDX external guide after a testnet
incident where an operator (
stakin-mpc2.testnet, node 13) added a pre-launchscript via the dstack UI to inspect data, restarted, and bricked the CVM:
Failed to open encrypted data disk/No key available with this passphrase.Why it happened: with the
local-sgxkey provider the LUKS disk key isderived from
MRTD + RTMR0..RTMR3. The app-compose (launcher compose,pre-launch/init scripts, toggles) is hashed into
RTMR3ascompose_hash, soany change re-derives a different key and the existing encrypted disk can no
longer be unsealed. Clearing the script again via the UI didn't help: the UI
re-serializes
app-compose.jsonand dropped the trailing newline inside theembedded
docker_compose_filestring, which survives dstack's normalizedhashing and changes
compose_hash. Recovery was to regenerate abyte-hash-identical app-compose via
deploy-launcher.shand push it withupdate-app-compose.Changes
docs/running-an-mpc-node-in-tdx-external-guide.md:sha256sum→update-app-compose→ restart; else fresh CVM + reshare). Cross-references Launcher / CVM Upgrade.Notes
Docs-only. Opened as draft for review of the mechanism wording (esp. the
normalized-hash detail) before merge.