Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/dstack/_internal/core/backends/vastai/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,16 @@ def update_provisioning_data(
and ": OCI runtime create failed:" in resp["status_msg"]
):
raise ProvisioningError(resp["status_msg"])
if (
resp.get("cur_state")
== resp.get("intended_status")
== resp.get("next_state")
== "stopped"
):
# Can happen, among other cases, when a spot instance is outbid (interrupted)
raise ProvisioningError(
"Vast.ai reports current and intended instance state as `stopped`"
)


class VastAIOfferBackendData(CoreModel):
Expand Down
Loading