fix(podman): kill timed container launches · openclaw/openclaw@6118f3f
vincentkoc
·
2026-05-26
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -38,7 +38,11 @@ fail() {
|
38 | 38 | |
39 | 39 | run_podman_detached() { |
40 | 40 | if command -v timeout >/dev/null 2>&1; then |
41 | | - timeout "$PODMAN_RUN_TIMEOUT" podman run "$@" |
| 41 | +if timeout --kill-after=1s 1s true >/dev/null 2>&1; then |
| 42 | + timeout --kill-after=30s "$PODMAN_RUN_TIMEOUT" podman run "$@" |
| 43 | +else |
| 44 | + timeout "$PODMAN_RUN_TIMEOUT" podman run "$@" |
| 45 | +fi |
42 | 46 | return |
43 | 47 | fi |
44 | 48 | podman run "$@" |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -153,6 +153,8 @@ describe("test-install-sh-docker", () => {
|
153 | 153 | expect(script).toContain('PODMAN_RUN_TIMEOUT="${OPENCLAW_PODMAN_RUN_TIMEOUT:-600s}"'); |
154 | 154 | expect(script).toContain("OPENCLAW_PODMAN_RUN_TIMEOUT|OPENCLAW_PODMAN_GATEWAY_HOST_PORT"); |
155 | 155 | expect(script).toContain("run_podman_detached()"); |
| 156 | +expect(script).toContain("timeout --kill-after=1s 1s true"); |
| 157 | +expect(script).toContain('timeout --kill-after=30s "$PODMAN_RUN_TIMEOUT" podman run "$@"'); |
156 | 158 | expect(script).toContain('timeout "$PODMAN_RUN_TIMEOUT" podman run "$@"'); |
157 | 159 | expect(script).toContain('podman run --pull="$PODMAN_PULL" --rm -it \\'); |
158 | 160 | expect(script).toContain('run_podman_detached --pull="$PODMAN_PULL" -d --replace \\'); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。