Skip to content

Commit

Permalink
fix: ensure network active check supports multi-cluster deployments
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick committed Feb 17, 2025
1 parent 962487b commit 269a0ef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/node/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any, any, any>) => {
if (enableDebugger) {
Expand All @@ -355,6 +356,10 @@ export class NodeCommandTasks {
title,
i,
status,
undefined,
undefined,
undefined,
context,
);
};

Expand All @@ -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<PodRef> {
nodeAlias = nodeAlias.trim() as NodeAlias;
const podName = Templates.renderNetworkPodName(nodeAlias);
Expand All @@ -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([
Expand Down

0 comments on commit 269a0ef

Please sign in to comment.