Skip to content

[Feature]: Orphan cleanup for the remaining backends #4546

Backlog

Description

@juancarlosm

Problem

#4401 added orphan cleanup and closed #3453; follow-ups added RunPod, GCP, Azure, Nebius and Kubernetes. The remaining backends that provision compute don't implement ComputeWithResourceListingSupport, so a lost instance on them is never reported or deleted: vastai, digitalocean, amddevcloud, lambdalabs, oci, cloudrift, crusoe, hotaisle, jarvislabs, seeweb, verda, vultr, plus daytona, lium and slurm on the run_job() path. Since #3453 is closed, nothing tracks this today.

  1. Is cleanup planned for these backends, and is there a reason some are excluded, for example a provider API that cannot list or filter instances?
  2. Could new backends be expected to implement it, or at least set provider_ref, before they are merged?

Use case: we share provider accounts across several dstack servers and with workloads outside dstack, so matching on provider_ref is exactly the behaviour we need.

Solution

Our priority is Vast.ai and DigitalOcean, and both look feasible with the existing approach:

  • Vast.ai has no tags, but its instance label is already set to the generated name. The name path RunPod uses (with_provider_ref=True, parse_provider_ref_from_name()) would apply.
  • DigitalOcean supports droplet tags, but create_instance() sends "tags": []. dstack_provider_ref could go there, which would also cover amddevcloud.

Workaround

None automatic: on these backends a lost instance has to be found by comparing the provider console with dstack ps by hand.

Would you like to help us implement this feature by sending a PR?

Yes, for the Vast.ai and DigitalOcean parts.

Activity

  1. r4victor commented on Nov 27, 2026

    @r4victor
    Collaborator

    We're eventually planning to support orphan cleanup for all backends but started with the most widely used. Feel free to submit PRs for DO and VastAI (separate PRs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions