Skip to content

[rust-launcher] Add dstack socket pre-check in TEE mode #2614

@barakeinav1

Description

@barakeinav1

Context

Follow-up from PR #2326 (port node launcher to Rust). Tracked in #2598.

Problem

The Python launcher explicitly checked is_unix_socket("/var/run/dstack.sock") before any TEE operation, failing early with a descriptive error. The Rust launcher has no pre-check -- it fails later inside emit_event() with a less descriptive error.

Action

Add an early check in TEE mode before calling emit_event():

if args.platform == Platform::Tee {
    if !std::path::Path::new(DSTACK_UNIX_SOCKET).exists() {
        return Err(LauncherError::DstackSocketMissing);
    }
}

Low priority -- UX improvement only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions