Skip to content

Commit

Permalink
set timeout for wait cmd (#1909)
Browse files Browse the repository at this point in the history
* set timeout for wait cmd

* lint

* inc to 300s
  • Loading branch information
pepoviola authored Oct 20, 2024
1 parent 1d504ab commit 0080f3f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions javascript/packages/orchestrator/src/providers/k8s/kubeClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ export class KubeClient extends Client {
await this.waitPodReady(name);

if (longRunning)
await this.runCommand(["wait", "--for=condition=Ready", `Pod/${name}`]);
await this.runCommand([
"wait",
"--for=condition=Ready",
// wait for 5 mins in case we need to spin a new vm
"--timeout=300s",
`Pod/${name}`,
]);

logTable = new CreateLogTable({
colWidths: [20, 100],
Expand Down Expand Up @@ -569,7 +575,13 @@ export class KubeClient extends Client {
xinfra,
});
debug("waiting for pod: fileserver, to be ready");
await this.runCommand(["wait", "--for=condition=Ready", "Pod/fileserver"]);
await this.runCommand([
"wait",
"--for=condition=Ready",
// wait for 5 mins in case we need to spin a new vm
"--timeout=300s",
"Pod/fileserver",
]);
await this.waitPodReady("fileserver");
debug("pod: fileserver, ready");
let fileServerOk = false;
Expand Down

0 comments on commit 0080f3f

Please sign in to comment.