Repository navigation
fix(dstackup): render the KMS 0.6 listener layout and default to KMS 0.6.7 - #1709
PierreLeGuen wants to merge 1 commit into
Conversation
dstackup wrote kms.toml with the listener settings at their pre-0.6
locations ([rpc], [core.admin], core.onboard.address/port), omitted
core.keyring_dir (which defaults to /var/lib/kms/keyring outside the
persistent /kms volume mount), and deployed KMS 0.5.11 by default. The
0.6 KMS refuses the old listener layout at startup ("the config sets
listener settings at their old locations"), and 0.5.11 has no SEV-SNP
support, so a dstackup install on an SNP host never gets a working KMS.
Render [listeners.default.tls], [listeners.guest], [listeners.admin] and
[listeners.onboard], put the keyring on the persistent KMS volume
(/kms/keyring), and default to the 0.6.7 KMS image, which reads that layout.
Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99b5ff3bd2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// compose hash. | ||
| pub const DEFAULT_KMS_IMAGE: &str = "dstacktee/dstack-kms:0.5.11@sha256:84b793feed825a5b5e70d04386e931e0e110461492793f17ab2128e39808d989"; | ||
| /// compose hash. It has to read the `[listeners.*]` layout `kms_toml` renders. | ||
| pub const DEFAULT_KMS_IMAGE: &str = "ghcr.io/dstack-tee/dstack-kms:0.6.7@sha256:693b7c80bad6f759a17f3cc62503eb1ef768852527d448dcfbbb9edb3e8f99f3"; |
There was a problem hiding this comment.
Register bootstrap roots before upgrading the default KMS
On a fresh default dstackup install, auth_allowlist_json() still writes neither kmsContractAddr nor rootEpochs, and the installer never registers them after bootstrap. KMS 0.6.7 sends application key requests to /authorizeApp, whose authorization predicate in dstack/crates/dstack-auth/src/main.rs:435-455 rejects this policy as root epoch not registered. Consequently, the normal dstack deploy flow cannot obtain application disk keys even after registering the compose hash. Register the verified bootstrap identity and epoch-zero CA/k256 keys before switching the default, or retain a compatible older image/config until that flow exists.
Useful? React with 👍 / 👎.
Summary
Updates
dstackup's generatedkms.tomlandDEFAULT_KMS_IMAGEto the KMS 0.6 layout so single-node SEV-SNP installs get a KMS image that supports SEV-SNP and stores its keyring on the persistentkms-volume.Changes
[listeners.default.tls],[listeners.guest],[listeners.admin], and[listeners.onboard]instead of the removed pre-0.6[rpc]/[core.admin]/core.onboard.{address,port}locations (dstack/crates/dstack-cli-core/src/config.rs).core.keyring_dir = "/kms/keyring"so root keys persist onkms-volumeinstead of/var/lib/kms/keyring.DEFAULT_KMS_IMAGEto digest-pinnedghcr.io/dstack-tee/dstack-kms:0.6.7.Note on
auth-allowlist.jsonroot epochsAs noted in
docs/onboarding.md#upgrading-the-local-kms-to-root-epochs(and flagged by Codex review on #1703), KMS 0.6.x authorizes application key release through/authorizeApp, which requireskmsContractAddrand epoch-0rootEpochsinauth-allowlist.json. This change is split into its own PR so the other fixes can be reviewed and merged independently — happy to follow up with post-bootstrap attested root-epoch registration (or keep0.5.11as default and select thekms.tomllayout per version) based on your preference.Verification
cargo test --locked -p dstack-cli-core -p dstackup: 18 + 31 passed.cargo clippy --locked -p dstack-cli-core -p dstackup -- -D warnings --allow unused_variablesandcargo fmt --all -- --check: pass.Split out from #1703.