Skip to content

[Bug]: Cannot delete idle instance if any runs are assigned to that fleet #3806

@jvstme

Description

@jvstme

Steps to reproduce

  1. Create a fleet with two instances.
  2. Assign a job to one of the instances.
  3. Try to delete the other (idle) instance.

Actual behaviour

$ dstack fleet
 NAME             NODES  GPU  SPOT  BACKEND          PRICE    STATUS  CREATED     
 fluffy-swan      2      -    auto  aws              -        active  4 mins ago  
    instance=0           -    spot  aws (us-east-2)  $0.0007  busy    4 mins ago  
    instance=1           -    spot  aws (us-east-2)  $0.0007  idle    4 mins ago

$ dstack fleet delete -y fluffy-swan -i 1
Failed to delete fleet fluffy-swan instances [1]. Fleet instances are in use.

Expected behaviour

$ dstack fleet delete -y fluffy-swan -i 1
Fleet fluffy-swan instances deleted

dstack version

0.20.17

Server logs

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfleets

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions