Skip to content

Conversation

@kvinwang
Copy link
Collaborator

@kvinwang kvinwang commented Jan 28, 2026

Summary

Add /run/*.sock and /run/dstack/*.sock to the socket path search list in all SDKs. This ensures compatibility with systemd socket activation which uses /run instead of /var/run.

Background

PR #478 introduced systemd socket activation for dstack-guest-agent, which creates sockets at /run/dstack.sock and /run/tappd.sock (using the modern /run path instead of legacy /var/run).

While /var/run is typically a symlink to /run on modern Linux systems, some container environments may not have this symlink configured. Adding explicit /run paths ensures SDKs work correctly in all environments.

Changes

Updated socket path search order in all SDKs:

  • Rust: sdk/rust/src/dstack_client.rs, sdk/rust/src/tappd_client.rs
  • Python: sdk/python/src/dstack_sdk/dstack_client.py
  • JavaScript: sdk/js/src/index.ts
  • Go: sdk/go/dstack/client.go, sdk/go/tappd/client.go

Search Order (legacy paths first for backward compatibility)

  1. /var/run/*.sock (legacy path)
  2. /run/*.sock (modern systemd path)
  3. /var/run/dstack/*.sock (namespaced legacy)
  4. /run/dstack/*.sock (namespaced modern)

@kvinwang kvinwang force-pushed the feat/sdk-run-socket-paths branch from b6a9edd to cbfb57c Compare January 28, 2026 02:49
Add /run/*.sock and /run/dstack/*.sock to the socket path search list
in all SDKs (Rust, Python, JS, Go). This ensures compatibility with
systemd socket activation which uses /run instead of /var/run.

Search order (legacy paths first for backward compatibility):
1. /var/run/*.sock (legacy path)
2. /run/*.sock (modern systemd path)
3. /var/run/dstack/*.sock (namespaced legacy)
4. /run/dstack/*.sock (namespaced modern)
@kvinwang kvinwang force-pushed the feat/sdk-run-socket-paths branch from cbfb57c to 5439d14 Compare January 28, 2026 02:51
@kvinwang kvinwang enabled auto-merge January 28, 2026 02:53
@kvinwang kvinwang merged commit b88777f into master Jan 28, 2026
11 checks passed
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.

2 participants