mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
board/common: fix container network change detection on pull
When a container's image is on an inaccessible remote server, the container wrapper script waits in the background for any netowrk changes to retry download of the image. This change avoids the dangerous previous construct, and is also easier to read: timeuot after 60 seconds unless ip monitor reads at least one event before that. Fixes #1124 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -782,7 +782,11 @@ case $cmd in
|
||||
|
||||
while ! "$script"; do
|
||||
log "${name}: setup failed, waiting for network changes ..."
|
||||
read -t 60 _ < <(ip monitor address route)
|
||||
|
||||
# Timeout and retry after 60 seconds, on SIGTERM, or when
|
||||
# any network event is caught.
|
||||
timeout -s TERM -k 1 60 sh -c \
|
||||
'ip monitor address route 2>/dev/null | head -n1 >/dev/null' || true
|
||||
|
||||
# On IP address/route changes, wait a few seconds more to ensure
|
||||
# the system has ample time to react and set things up for us.
|
||||
|
||||
@@ -15,6 +15,8 @@ All notable changes to the project are documented in this file.
|
||||
### Fixes
|
||||
- Fix #1098: Prune dangling container images to reclaim disk space
|
||||
- Fix #1123: Disabling or removing a container may cause podman to hang
|
||||
- Fix #1124: Container setup with unreachable remote image spawns
|
||||
excessive `ip monitor` processes
|
||||
|
||||
[RPI-TOUCH]: https://www.raspberrypi.com/products/raspberry-pi-touch-display/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user