Skip to content

Commit

Permalink
fix: increase load balancer check waiting time and make values config…
Browse files Browse the repository at this point in the history
…urable via env (#1461)

Signed-off-by: Nathan Klick <[email protected]>
  • Loading branch information
nathanklick authored Feb 24, 2025
1 parent b1440a2 commit 9e7e572
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ export class NetworkCommand extends BaseCommand {
let attempts = 0;
let svc = null;

while (attempts < 30) {
while (attempts < constants.LOAD_BALANCER_CHECK_MAX_ATTEMPTS) {
svc = await self.k8Factory
.getK8(consensusNode.context)
.services()
Expand All @@ -866,7 +866,7 @@ export class NetworkCommand extends BaseCommand {
}

attempts++;
await helpers.sleep(Duration.ofSeconds(2));
await helpers.sleep(Duration.ofSeconds(constants.LOAD_BALANCER_CHECK_DELAY_SECS));
}
throw new SoloError('Load balancer not found');
},
Expand Down
3 changes: 3 additions & 0 deletions src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ export const RELAY_PODS_READY_DELAY = +process.env.RELAY_PODS_READY_DELAY || 1_0
export const GRPC_PORT = +process.env.GRPC_PORT || 50_211;
export const LOCAL_BUILD_COPY_RETRY = +process.env.LOCAL_BUILD_COPY_RETRY || 3;

export const LOAD_BALANCER_CHECK_DELAY_SECS = +process.env.LOAD_BALANCER_CHECK_DELAY_SECS || 5;
export const LOAD_BALANCER_CHECK_MAX_ATTEMPTS = +process.env.LOAD_BALANCER_CHECK_MAX_ATTEMPTS || 60;

export const NETWORK_DESTROY_WAIT_TIMEOUT = +process.env.NETWORK_DESTROY_WAIT_TIMEOUT || 120;

export const DEFAULT_LOCAL_CONFIG_FILE = 'local-config.yaml';
Expand Down

0 comments on commit 9e7e572

Please sign in to comment.