Compare commits

..
Author SHA1 Message Date
MickLesk 8d870e5675 Report an interrupted update-apps backup as cancelled, not failed
vzdump answers Ctrl+C, or a stop from the task list, with "interrupted
by signal", and update-apps reported that as "Backup failed" (exit 235).
On a test host Ctrl+C during the backup gives exactly the message seen
in eight of the 33 backup failures of the last four days; closing the
console does not stop the backup. Report it as interrupted with exit
130 instead.

A rejected vzdump option ends its output with the usage line, so the
reason read "vzdump {<vmid>} [OPTIONS]". Skip that line so the option's
own error is shown.
2026-11-20 17:25:32 +01:00
3 changed files with 9 additions and 9 deletions

No files matched your search

+1 -4
View File
@@ -68,10 +68,7 @@ function update_script() {
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
rm -f "/tmp/nginx-${commit}.patch"
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "-" | patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s
done
msg_ok "Patched nginx HTTP/2"
+1 -4
View File
@@ -42,10 +42,7 @@ fetch_and_deploy_from_url "https://openresty.org/download/openresty-${OPENRESTY_
msg_info "Patching nginx HTTP/2 (CVE-2026-123007, CVE-2026-123633)"
for commit in 61031503dc8087c2c17cd2142c9b4b19062f90c4 2df48a501d0fb8212b7d39dffeeff5876332ba59 e27f5fa84fe6e98505e70bc543b748747dad0a3b; do
curl_with_retry "https://api.github.com/repos/nginx/nginx/commits/${commit}" "/tmp/nginx-${commit}.patch" "-HAccept:application/vnd.github.patch" ||
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "/tmp/nginx-${commit}.patch"
patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s <"/tmp/nginx-${commit}.patch"
rm -f "/tmp/nginx-${commit}.patch"
curl_with_retry "https://github.com/nginx/nginx/commit/${commit}.patch" "-" | patch -d /opt/openresty/bundle/nginx-1.31.8 -p1 --forward -s
done
msg_ok "Patched nginx HTTP/2"
+7 -1
View File
@@ -275,7 +275,8 @@ function dry_run_container() {
function failure_reason() {
local reason
reason=$(grep -m1 '^ERROR:' <<<"$1" | sed 's/^ERROR: //')
[[ -n "$reason" ]] || reason=$(grep -v '^[[:space:]]*$' <<<"$1" | tail -n1)
# A rejected option ends in the usage line, the option's error is above it.
[[ -n "$reason" ]] || reason=$(grep -v -e '^[[:space:]]*$' -e '\[OPTIONS\]$' <<<"$1" | tail -n1)
printf '%s' "$reason"
}
@@ -286,6 +287,11 @@ function backup_container() {
msg_ok "Backup created"
else
log_write "Container $1: vzdump failed:"$'\n'"$output"
# Ctrl+C, or the task was stopped: the backup did not fail, it was cancelled.
if grep -q "interrupted by signal" <<<"$output"; then
msg_error "Backup of container $1 was interrupted (Ctrl+C or the task was stopped)"
exit 130
fi
msg_error "Backup failed for container $1: $(failure_reason "$output")"
exit 235
fi