From 234095e4562a7e8d462e9fe1d4330eb017422ae0 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Sun, 4 Jun 2023 15:43:03 +0300 Subject: [PATCH] Fix pool ID check when listing instances We should be looking for the poolIDKey in the extended LXD config. Signed-off-by: Gabriel Adrian Samfira --- runner/providers/lxd/lxd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runner/providers/lxd/lxd.go b/runner/providers/lxd/lxd.go index aabc03f8..dea9c409 100644 --- a/runner/providers/lxd/lxd.go +++ b/runner/providers/lxd/lxd.go @@ -417,7 +417,7 @@ func (l *LXD) ListInstances(ctx context.Context, poolID string) ([]params.Instan for _, instance := range instances { if id, ok := instance.ExpandedConfig[controllerIDKeyName]; ok && id == l.controllerID { if poolID != "" { - id := instance.ExpandedConfig[poolID] + id := instance.ExpandedConfig[poolIDKey] if id != poolID { // Pool ID was specified. Filter out instances belonging to other pools. continue