From 982ae6748a10df4510aa7dc1df83769f5fd03c7a Mon Sep 17 00:00:00 2001 From: Victor Skvortsov Date: Thu, 23 May 2024 16:15:32 +0500 Subject: [PATCH] Fix instances from pools ignoring regions --- src/dstack/_internal/server/services/pools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dstack/_internal/server/services/pools.py b/src/dstack/_internal/server/services/pools.py index b2a0ea95f..b8b58d994 100644 --- a/src/dstack/_internal/server/services/pools.py +++ b/src/dstack/_internal/server/services/pools.py @@ -375,6 +375,9 @@ def filter_pool_instances( if profile.backends is not None and instance.backend not in profile.backends: continue + if profile.regions is not None and instance.region not in profile.regions: + continue + if multinode and instance.backend not in BACKENDS_WITH_MULTINODE_SUPPORT: continue