From 05447c413f3dcd634611703b410b87bfbe2b2638 Mon Sep 17 00:00:00 2001 From: Christian Kreibich Date: Wed, 22 Jun 2022 16:31:38 -0700 Subject: [PATCH] Management framework: bugfix for a get_id_value corner case For the case of a running cluster with no connected agents, use the g_instances_known table instead of g_instances. The latter reflects the contents of the last deployed config, not the live scenario of actually attached agents. --- scripts/policy/frameworks/management/controller/main.zeek | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/policy/frameworks/management/controller/main.zeek b/scripts/policy/frameworks/management/controller/main.zeek index a5c1840b18..2696ecc929 100644 --- a/scripts/policy/frameworks/management/controller/main.zeek +++ b/scripts/policy/frameworks/management/controller/main.zeek @@ -1166,7 +1166,7 @@ event Management::Controller::API::get_id_value_request(reqid: string, id: strin local res: Management::Result; # Special case: if we have no instances, respond right away. - if ( |g_instances| == 0 ) + if ( |g_instances_known| == 0 ) { Management::Log::info(fmt("tx Management::Controller::API::get_id_value_response %s", reqid)); res = Management::Result($reqid=reqid, $success=F, $error="no instances connected");