-
Notifications
You must be signed in to change notification settings - Fork 217
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Steps to reproduce
-
Spin up dstack server (I've only tested using AWS as backend with a pretty simple layout)
-
Add a fleet with a node max:
fleet.yml
name: test-fleet
nodes: 0..3
resources:
cpu: 1..
- write a script to shove tasks in via the rest API:
import requests
import json
token = "*****"
header = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": f"Bearer {token}"
}
server_url = "http://127.0.0.1:3000"
project_name = "main"
sub_url = "runs/apply"
runs = 10
for i in range(runs):
data = {
"force": True,
"plan": {
"run_spec": {
"configuration": {
"type": "task",
"image": "ubuntu:22.04",
"creation_policy": "reuse-or-create",
"commands": ["date", "sleep 6", "date"],
"fleets": ["test-fleet"]
}
}
}
}
requests.post(f"{server_url}/api/project/{project_name}/{sub_url}",
headers=header, data=json.dumps(data))
- Run it (in my case, on the server)
Actual behaviour
The runs appear as expected:
But extra instances appear, more than the node max:
And these are real instances, not just phantoms, as seen here in my AWS console:
Expected behaviour
Given that the max nodes on the fleet was set to 3, I would've expected only 3 instances to spin up.
dstack version
20.12
Server logs
<Full logs as file below>Additional information
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working