mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-06 01:43:32 +02:00
fix(komga): bound the nginx readiness probes and log an exhausted wait
Follow-up to #2960, which merged one commit before this landed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.26.1.1 (2026-08-11)
|
||||||
|
|
||||||
|
- Bound the nginx readiness probes (`--connect-timeout` / `--max-time`) so a stalled connection cannot hang the wait, and log a warning when Komga has not answered within 15 minutes
|
||||||
|
|
||||||
## 1.26.1 (2026-08-11)
|
## 1.26.1 (2026-08-11)
|
||||||
|
|
||||||
- Initial release, based on gotson/komga ([changelog](https://github.com/gotson/komga/releases))
|
- Initial release, based on gotson/komga ([changelog](https://github.com/gotson/komga/releases))
|
||||||
|
|||||||
@@ -101,4 +101,4 @@ schema:
|
|||||||
slug: komga
|
slug: komga
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons/tree/master/komga
|
url: https://github.com/alexbelgium/hassio-addons/tree/master/komga
|
||||||
version: "1.26.1"
|
version: "1.26.1.1"
|
||||||
|
|||||||
@@ -8,12 +8,23 @@ set -e
|
|||||||
# bashio::net.wait_for : bashio takes (port host timeout) while the bundled
|
# bashio::net.wait_for : bashio takes (port host timeout) while the bundled
|
||||||
# bashio-standalone.sh takes (host port timeout), and picking the wrong one
|
# bashio-standalone.sh takes (host port timeout), and picking the wrong one
|
||||||
# would either fail instantly or block for the whole timeout.
|
# would either fail instantly or block for the whole timeout.
|
||||||
|
# The per probe timeouts keep the 15 minute ceiling real : without them a
|
||||||
|
# half open connection would hang a single probe, and the loop, forever.
|
||||||
|
komga_ready=false
|
||||||
for _ in $(seq 1 180); do
|
for _ in $(seq 1 180); do
|
||||||
if curl -sf -o /dev/null "http://127.0.0.1:25600/komga/"; then
|
if curl -sf --connect-timeout 2 --max-time 5 -o /dev/null "http://127.0.0.1:25600/komga/"; then
|
||||||
|
komga_ready=true
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Deliberately not fatal : nginx serving a 502 tells the user something is wrong
|
||||||
|
# and starts working by itself once komga finally answers, while refusing to
|
||||||
|
# start would take ingress down for good after ha_entrypoint gives up retrying.
|
||||||
|
if [ "$komga_ready" != true ]; then
|
||||||
|
bashio::log.warning "Komga did not answer within 15 minutes. Starting NGinx anyway : ingress will return 502 until it does."
|
||||||
|
fi
|
||||||
|
|
||||||
bashio::log.info "Starting NGinx..."
|
bashio::log.info "Starting NGinx..."
|
||||||
exec nginx
|
exec nginx
|
||||||
|
|||||||
Reference in New Issue
Block a user