Skip to content

Commit d01981c

Browse files
authored
Restore instance.wait_until_running() in AWS create_instance (#3694)
1 parent c445ec1 commit d01981c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dstack/_internal/core/backends/aws/compute.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ def create_instance(
351351
raise ComputeError(f"Invalid AWS request: {msg}")
352352
continue
353353
instance = response[0]
354+
# wait_until_running() is only needed so that instance is immediately ready for volume attach.
355+
# TODO: Drop wait_until_running() once attach readiness is checked outside.
356+
instance.wait_until_running()
354357
if instance_offer.instance.resources.spot:
355358
# it will not terminate the instance
356359
try:

0 commit comments

Comments
 (0)