From 031eab71fadc0e85297fc448109a3c22efaa71d5 Mon Sep 17 00:00:00 2001 From: Julian Minde Date: Fri, 19 Jan 2024 16:18:49 +0100 Subject: [PATCH] check that node.roles is defined Signed-off-by: Julian Minde --- lib/Transport.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Transport.js b/lib/Transport.js index f86f73c8f..42e744ba0 100644 --- a/lib/Transport.js +++ b/lib/Transport.js @@ -676,6 +676,7 @@ function defaultNodeFilter(node) { // avoid cluster_manager or master only nodes // TODO: remove role check on master when master is not supported if ( + node.roles && (node.roles.cluster_manager === true || node.roles.master === true) && node.roles.data === false && node.roles.ingest === false