Repository navigation
fix(dstackup): fix systemd units, mkosi image discovery, and auto host ports - #1707
Open
PierreLeGuen wants to merge 4 commits into
Open
PierreLeGuen wants to merge 4 commits into
PierreLeGuen wants to merge 4 commits into
Conversation
systemd does not unquote `WorkingDirectory=`, so the quoted value dstackup
wrote is read as a relative path. systemd 259 rejects it ("path is not
absolute"), and `dstackup install` then fails to start dstack-auth. Write
the path bare, escaping only `%`.
Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
The VMM host API binds vsock CID 2, which needs the vhost_vsock transport.
/dev/vhost-vsock is a static device node that loads the module only on
first open, so on a fresh host the bind fails with EADDRNOTAVAIL and the
VMM exits ("Failed to bind host API"). Load the module in ExecStartPre.
Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
Guest-OS releases are tagged `mkosi-os-v<version>` by the mkosi release workflow, but `dstackup image pull` only looked for `guest-os-v`, so both a pinned `--version` and the latest-release lookup found nothing for 0.6.x. Look up `mkosi-os-v` first and keep `guest-os-v` as a fallback. These releases also publish `dstack-<version>-kernel-devel.tar.gz`, which the asset picker accepted as a host image; skip it like the `-uki` archive. Signed-off-by: Pierre LE GUEN <26087574+PierreLeGuen@users.noreply.github.com>
`free_local_port()` bound port 0, which returns a kernel ephemeral port (32768 and up). The vmm.toml that `dstackup install` writes only allows tcp 1-20000, so the VMM refused every auto-picked port: the KMS CVM deploy in `dstackup install` failed with "Port mapping is not allowed", and so did `dstack deploy --port <vm>` without a host port. Pick a free loopback port from 10000-19999 instead, and test that the rendered port-mapping range covers it. 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. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four bugfixes for single-node
dstackup install,dstackup image pull, anddstack deploy:Changes
fix(dstackup): write WorkingDirectory as a bare path in unit files(dstack/crates/dstackup/src/systemd.rs): systemd 259 rejects quotedWorkingDirectory=as non-absolute; write the bare path escaping only%.fix(dstackup): load vhost_vsock before starting the VMM(dstack/crates/dstackup/src/systemd.rs): addExecStartPre=/sbin/modprobe vhost_vsockso CID 2 host-API bind works on fresh hosts.fix(dstackup): find mkosi-os-v guest-OS releases(dstack/crates/dstackup/src/image.rs): look upmkosi-os-v*release tags first (keepingguest-os-v*fallback) and exclude*-kernel-devel.tar.gzfrom host image candidates.fix(dstack-cli): pick auto host ports inside the VMM port-mapping range(dstack/crates/dstack-cli-core/src/{ports.rs,config.rs}): pick free loopback ports from10000..=19999instead of kernel ephemeral ports rejected byvmm.toml's1-20000range.Verification
cargo test --locked -p dstack-cli-core -p dstackup: 20 + 34 passed.cargo clippy --locked -p dstack-cli-core -p dstackup -- -D warnings --allow unused_variablesandcargo fmt --all -- --check: pass.Split out from #1703.