You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: A lock on an unused volume alternative can fail a job #4554
In one project, configure a GCP volume named gcp-data and an AWS volume named aws-data. Use an AWS instance in the AWS volume’s region.
Start a GCP job that mounts gcp-data.
While the GCP attachment is in progress, schedule a second job on the AWS instance with these alternatives for one mount point.
volumes:
- name: [gcp-data, aws-data]path: /data
To reproduce the overlap deterministically in a worker test, pause the first job’s compute.attach_volume() after it acquires its volume lock. Process the AWS job and then let the first call finish.
Actual behaviour
The AWS job enters TERMINATING with VOLUME_ERROR and the message Failed to attach volume: Cannot attach a volume locked for processing. Its backend never receives an attach request. The GCP job continues normally.
The submitted-job worker takes locks on all configured alternatives before selecting the volume for the assigned instance. Worker
Expected behaviour
The AWS job can attach aws-data while the GCP job attaches gcp-data.
dstack version
master (e7645afd1). Reproduced with two submitted-job workers on SQLite and PostgreSQL and mocked provider attach calls.
Activity