Skip to content

Commit

Permalink
chore: fixed invalid args to getPauseArgs and getResumeArgs of podman…
Browse files Browse the repository at this point in the history
… client
  • Loading branch information
l0r1s committed Apr 25, 2023
1 parent 390b3cc commit 5ac57de
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,20 +489,32 @@ export class PodmanClient extends Client {
}

getPauseArgs(name: string): string[] {
return ["exec", name, "--", "bash", "-c", "echo pause > /tmp/zombiepipe"];
return [
"exec",
`${name}_pod-${name}`,
"bash",
"-c",
"echo pause > /tmp/zombiepipe",
];
}
getResumeArgs(name: string): string[] {
return ["exec", name, "--", "bash", "-c", "echo resume > /tmp/zombiepipe"];
return [
"exec",
`${name}_pod-${name}`,
"bash",
"-c",
"echo resume > /tmp/zombiepipe",
];
}

async restartNode(name: string, timeout: number | null): Promise<boolean> {
const args = ["exec", name, "--", "bash", "-c"];
const args = ["exec", `${name}_pod-${name}`, "bash", "-c"];
const cmd = timeout
? `echo restart ${timeout} > /tmp/zombiepipe`
: `echo restart > /tmp/zombiepipe`;
args.push(cmd);

const result = await this.runCommand(args, { scoped: true });
const result = await this.runCommand(args, { scoped: false });
return result.exitCode === 0;
}

Expand Down

0 comments on commit 5ac57de

Please sign in to comment.