mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
webui: add support bundle to Backup & Support
Rename the Maintenance > Backup & Restore page to Backup & Support and add a Support Bundle card. Download support runs the on-device `support collect` tool, which gathers configuration, logs, routing, interfaces, hardware inventory, and container and service status into a single archive; the WebUI runs as root so the collection is complete. The handler buffers the archive and only commits response headers once collection succeeds, so a mid-collection failure is a clean error rather than a truncated download. An optional password encrypts the bundle via the tool's GPG support, fed on stdin so it never reaches the process list. Collection blocks for up to a minute with no output, so the write deadline is extended past the server's 15s WriteTimeout and nginx gets a matching read timeout; the browser shows a "collecting" state and saves the blob client-side using the server's filename. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -45,6 +45,16 @@ location ~ ^/maintenance/logs/[^/]+/tail$ {
|
||||
include /etc/nginx/webui-proxy.conf;
|
||||
}
|
||||
|
||||
# Support bundle collection runs `support collect`, which emits nothing
|
||||
# until it finishes (~50 s) and then sends the whole archive at once.
|
||||
# The upstream is silent for that window, so the default 60 s
|
||||
# proxy_read_timeout would 504 just as the bundle is ready. Buffering
|
||||
# stays on — it's a plain file download, not a stream.
|
||||
location = /maintenance/support-bundle {
|
||||
proxy_read_timeout 300s;
|
||||
include /etc/nginx/webui-proxy.conf;
|
||||
}
|
||||
|
||||
# Liveness probe — nginx-only, no upstream call. Used by the watchdog
|
||||
# div in base.html and the reboot-overlay poller.
|
||||
location = /device-status {
|
||||
|
||||
Reference in New Issue
Block a user