From 269a0ef5a9f3dcdbfe101c2e2894aa5bf6bdd340 Mon Sep 17 00:00:00 2001 From: Nathan Klick Date: Mon, 17 Feb 2025 10:45:29 -0600 Subject: [PATCH] fix: ensure network active check supports multi-cluster deployments Signed-off-by: Nathan Klick --- src/commands/node/tasks.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/node/tasks.ts b/src/commands/node/tasks.ts index 87180dabb..4a4d5d97b 100644 --- a/src/commands/node/tasks.ts +++ b/src/commands/node/tasks.ts @@ -343,6 +343,7 @@ export class NodeCommandTasks { ? 'Please attach JVM debugger now. Sleeping for 1 hour, hit ctrl-c once debugging is complete.' : ''; const title = `Check network pod: ${chalk.yellow(nodeAlias)} ${chalk.red(reminder)}`; + const context = helpers.extractContextFromConsensusNodes(nodeAlias, ctx.config.consensusNodes); const subTask = async (ctx: any, task: ListrTaskWrapper) => { if (enableDebugger) { @@ -355,6 +356,10 @@ export class NodeCommandTasks { title, i, status, + undefined, + undefined, + undefined, + context, ); }; @@ -379,6 +384,7 @@ export class NodeCommandTasks { maxAttempts = constants.NETWORK_NODE_ACTIVE_MAX_ATTEMPTS, delay = constants.NETWORK_NODE_ACTIVE_DELAY, timeout = constants.NETWORK_NODE_ACTIVE_TIMEOUT, + context?: string, ): Promise { nodeAlias = nodeAlias.trim() as NodeAlias; const podName = Templates.renderNetworkPodName(nodeAlias); @@ -397,7 +403,7 @@ export class NodeCommandTasks { try { const response = await this.k8Factory - .default() + .getK8(context) .containers() .readByRef(ContainerRef.of(podRef, constants.ROOT_CONTAINER)) .execContainer([