mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
board/common: workaround missing --retry=NUM flag to podman
Disable the default "podman pull" retry value. We use execd to retry "podman create" on failure. Wihtout this change, a single container can block start of other containers by 3 * 20 seconds. Now we only block max 20 seconds before we try starting the next container. Modern versions of podman (>= 5.0) have this --retry option, but it does not have CNI, so this is a temporary workaround. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -187,6 +187,10 @@ create()
|
||||
logging="--log-driver k8s-file --log-opt path=/run/containers/$name.fifo"
|
||||
fi
|
||||
|
||||
# Pull quietly and don't retry on failure, we use execd for this,
|
||||
# or user retry manually when run interactively, we may have other
|
||||
# containers waiting to start that have an image locally already.
|
||||
# Use --retry=0 with Podman 5.0 or later.
|
||||
args="$args --read-only --replace --quiet --cgroup-parent=containers $caps"
|
||||
args="$args --restart=$restart --systemd=false --tz=local $privileged"
|
||||
args="$args $vol $mount $hostname $entrypoint $env $port $logging"
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
This patch disables the default "podman pull" retry value, which otherwise
|
||||
blocks execd from trying other jobs in its queue.
|
||||
|
||||
As of podman v5.0.0 a --retry=NUM has been added to the podman create, run,
|
||||
and pull commands. However, CNI is no longer supported, and a lot of other
|
||||
breaking changes have been made, e.g., output of podman inspect. So there's
|
||||
a lot of work upgrading.
|
||||
|
||||
-- Joachim
|
||||
|
||||
--- a/vendor/github.com/containers/common/libimage/copier.go 2023-04-14 15:28:20.000000000 +0200
|
||||
+++ b/vendor/github.com/containers/common/libimage/copier.go 2024-11-16 13:05:42.207641898 +0100
|
||||
@@ -24,7 +24,7 @@
|
||||
)
|
||||
|
||||
const (
|
||||
- defaultMaxRetries = 3
|
||||
+ defaultMaxRetries = 0
|
||||
defaultRetryDelay = time.Second
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user