Skip to content

Commit 71b38d0

Browse files
committed
fix: increase load balancer check waiting time and make values configurable via env
Signed-off-by: Nathan Klick <[email protected]>
1 parent b1440a2 commit 71b38d0

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/commands/network.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ export class NetworkCommand extends BaseCommand {
842842
let attempts = 0;
843843
let svc = null;
844844

845-
while (attempts < 30) {
845+
while (attempts < constants.LOAD_BALANCER_CHECK_MAX_ATTEMPTS) {
846846
svc = await self.k8Factory
847847
.getK8(consensusNode.context)
848848
.services()
@@ -866,7 +866,7 @@ export class NetworkCommand extends BaseCommand {
866866
}
867867

868868
attempts++;
869-
await helpers.sleep(Duration.ofSeconds(2));
869+
await helpers.sleep(Duration.ofSeconds(constants.LOAD_BALANCER_CHECK_DELAY_SECS));
870870
}
871871
throw new SoloError('Load balancer not found');
872872
},

src/core/constants.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ export const RELAY_PODS_READY_DELAY = +process.env.RELAY_PODS_READY_DELAY || 1_0
204204
export const GRPC_PORT = +process.env.GRPC_PORT || 50_211;
205205
export const LOCAL_BUILD_COPY_RETRY = +process.env.LOCAL_BUILD_COPY_RETRY || 3;
206206

207+
export const LOAD_BALANCER_CHECK_DELAY_SECS = +process.env.LOAD_BALANCER_CHECK_DELAY_SECS || 5;
208+
export const LOAD_BALANCER_CHECK_MAX_ATTEMPTS = +process.env.LOAD_BALANCER_CHECK_MAX_ATTEMPTS || 60;
209+
207210
export const NETWORK_DESTROY_WAIT_TIMEOUT = +process.env.NETWORK_DESTROY_WAIT_TIMEOUT || 120;
208211

209212
export const DEFAULT_LOCAL_CONFIG_FILE = 'local-config.yaml';

0 commit comments

Comments
 (0)