mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-10-08 22:46:41 +00:00
feat(oci): watchdog that restarts an application when it stops on its own
- New service that starts again an OCI application that stopped on its own, such as Frigate after Save & Restart. A stop or shutdown asked by the user, a backup, a migration and a ProxMenux operation are never undone. - The installer asks it in both modes and proposes what the recipe declares; it is changed from the management menu or with the Watchdog switch of the container modal in the Monitor. - Notifications when the watchdog restarts an application and when it keeps stopping. - The service is recorded in the change journal, and the feature is documented.
This commit is contained in:
@@ -49,6 +49,11 @@
|
||||
"The editor opens with the current contract; the CT is rebuilt with the changes",
|
||||
"The data of container disks and host directories"
|
||||
],
|
||||
[
|
||||
"Watchdog: restart the application when it crashes",
|
||||
"Whether the application is started again when it stops on its own. Nothing is rebuilt",
|
||||
"The whole installation; only the choice is saved in the contract"
|
||||
],
|
||||
[
|
||||
"Remove: delete the application and its containers",
|
||||
"The LXC, or every member of a stack, and their contracts are deleted",
|
||||
@@ -58,7 +63,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "For a multi-container application the menu offers <strong>Update every container of the application</strong>, <strong>Modify extra paths and devices</strong>, <strong>Recreate every container with its saved configuration</strong> and the removal. Modify adds or removes the extra paths and devices of the application container without rebuilding anything and, in Immich, changes what runs recognition. Recreate rebuilds every container from the image it was installed with, without looking for a newer one."
|
||||
"p": "For a multi-container application the menu offers <strong>Update every container of the application</strong>, <strong>Modify extra paths and devices</strong>, <strong>Recreate every container with its saved configuration</strong>, the watchdog and the removal. Modify adds or removes the extra paths and devices of the application container without rebuilding anything and, in Immich, changes what runs recognition. Recreate rebuilds every container from the image it was installed with, without looking for a newer one."
|
||||
},
|
||||
{
|
||||
"figure": {
|
||||
@@ -158,6 +163,52 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "watchdog",
|
||||
"title": "Watchdog: restarting an application that stops",
|
||||
"intro": "Proxmox has no restart policy: when the process of an application container ends, the container stays stopped. With the watchdog on, an application that stops on its own is started again. It does for an OCI application what <code>restart: unless-stopped</code> does in a Compose file.",
|
||||
"blocks": [
|
||||
{
|
||||
"table": {
|
||||
"headers": [
|
||||
"What happens",
|
||||
"With the watchdog on"
|
||||
],
|
||||
"rows": [
|
||||
[
|
||||
"The application crashes or its process ends",
|
||||
"The container is started again within seconds"
|
||||
],
|
||||
[
|
||||
"It is stopped or shut down from Proxmox, from the Monitor or with <code>pct</code>",
|
||||
"It stays stopped until somebody starts it"
|
||||
],
|
||||
[
|
||||
"A backup, a migration or a ProxMenux operation is working on it",
|
||||
"Nothing is done until that ends"
|
||||
],
|
||||
[
|
||||
"It was already stopped when the host started",
|
||||
"It stays stopped; <strong>Start with Proxmox</strong> decides that"
|
||||
],
|
||||
[
|
||||
"It keeps stopping right after starting",
|
||||
"An application that stops again within seconds of starting is tried five times, waiting 30 seconds, 1, 2 and 5 minutes between them. Then it is left stopped and a notification is sent"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "The installer asks it in both installation modes and proposes what the recipe of the application declares. It is changed later from <strong>Manage installed OCI applications</strong> or with the <strong>Watchdog</strong> switch of the container in <monitorLink>ProxMenux Monitor</monitorLink>, and it applies to every container of a multi-container application. One service of the host, <code>proxmenux-oci-watchdog.service</code>, watches every application that asked for it; its installation is listed in the Changes tab of Audit & Report."
|
||||
},
|
||||
{
|
||||
"calloutInfo": {
|
||||
"title": "What the host cannot tell",
|
||||
"body": "The exit code of the application does not reach the host, so a clean exit and a crash look the same and both are restarted, as <code>always</code> and <code>unless-stopped</code> do in Docker. A stop asked outside Proxmox, with <code>lxc-stop</code> or <code>systemctl</code>, leaves no stop task and is taken as a stop of its own."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "restore",
|
||||
"title": "Backup, restore and another host",
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
"What changes for an OCI container"
|
||||
],
|
||||
"rows": [
|
||||
[
|
||||
"Status",
|
||||
"A <strong>Watchdog</strong> switch under Start at boot: the application is started again when it stops on its own"
|
||||
],
|
||||
[
|
||||
"App",
|
||||
"The application is identified from the record, and updates are tracked by image"
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
"El editor se abre con el contrato actual; el CT se reconstruye con los cambios",
|
||||
"Los datos de los discos del contenedor y de los directorios del host"
|
||||
],
|
||||
[
|
||||
"Vigilancia: reiniciar la aplicación cuando falla",
|
||||
"Si la aplicación se inicia de nuevo cuando se detiene sola. No se reconstruye nada",
|
||||
"Toda la instalación; solo se guarda la elección en el contrato"
|
||||
],
|
||||
[
|
||||
"Eliminar: la aplicación y sus contenedores",
|
||||
"Se eliminan el LXC, o todos los miembros de una pila, y sus contratos",
|
||||
@@ -58,7 +63,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "Para una aplicación multicontenedor el menú ofrece <strong>Actualizar cada contenedor de la aplicación</strong>, <strong>Modificar rutas extra y dispositivos</strong>, <strong>Recrear todos los contenedores con su configuración guardada</strong> y la eliminación. Modificar añade o elimina las rutas y los dispositivos extra del contenedor de la aplicación sin reconstruir nada y, en Immich, cambia qué ejecuta el reconocimiento. Recrear reconstruye cada contenedor desde la imagen con la que se instaló, sin buscar una más nueva."
|
||||
"p": "Para una aplicación multicontenedor el menú ofrece <strong>Actualizar cada contenedor de la aplicación</strong>, <strong>Modificar rutas extra y dispositivos</strong>, <strong>Recrear todos los contenedores con su configuración guardada</strong>, la vigilancia y la eliminación. Modificar añade o elimina las rutas y los dispositivos extra del contenedor de la aplicación sin reconstruir nada y, en Immich, cambia qué ejecuta el reconocimiento. Recrear reconstruye cada contenedor desde la imagen con la que se instaló, sin buscar una más nueva."
|
||||
},
|
||||
{
|
||||
"figure": {
|
||||
@@ -158,6 +163,52 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "watchdog",
|
||||
"title": "Vigilancia: reiniciar una aplicación que se detiene",
|
||||
"intro": "Proxmox no tiene política de reinicio: cuando termina el proceso de un contenedor de aplicación, el contenedor se queda parado. Con la vigilancia activada, una aplicación que se detiene sola se inicia de nuevo. Hace por una aplicación OCI lo que <code>restart: unless-stopped</code> hace en un fichero Compose.",
|
||||
"blocks": [
|
||||
{
|
||||
"table": {
|
||||
"headers": [
|
||||
"Qué ocurre",
|
||||
"Con la vigilancia activada"
|
||||
],
|
||||
"rows": [
|
||||
[
|
||||
"La aplicación falla o su proceso termina",
|
||||
"El contenedor se inicia de nuevo en segundos"
|
||||
],
|
||||
[
|
||||
"Se detiene o se apaga desde Proxmox, desde el Monitor o con <code>pct</code>",
|
||||
"Se queda parado hasta que alguien lo inicia"
|
||||
],
|
||||
[
|
||||
"Un backup, una migración o una operación de ProxMenux está trabajando en él",
|
||||
"No se hace nada hasta que termina"
|
||||
],
|
||||
[
|
||||
"Ya estaba parado cuando arrancó el host",
|
||||
"Se queda parado; eso lo decide <strong>Iniciar con Proxmox</strong>"
|
||||
],
|
||||
[
|
||||
"No deja de detenerse nada más arrancar",
|
||||
"Una aplicación que vuelve a detenerse a los pocos segundos de arrancar se intenta cinco veces, con esperas de 30 segundos, 1, 2 y 5 minutos entre ellas. Después se deja parada y se envía una notificación"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": "El instalador lo pregunta en los dos modos de instalación y propone lo que declara la receta de la aplicación. Después se cambia desde <strong>Gestionar aplicaciones OCI instaladas</strong> o con el interruptor <strong>Vigilancia</strong> del contenedor en <monitorLink>ProxMenux Monitor</monitorLink>, y se aplica a todos los contenedores de una aplicación multicontenedor. Un único servicio del host, <code>proxmenux-oci-watchdog.service</code>, vigila todas las aplicaciones que lo pidieron; su instalación aparece en la pestaña Cambios de Audit & Report."
|
||||
},
|
||||
{
|
||||
"calloutInfo": {
|
||||
"title": "Lo que el host no puede distinguir",
|
||||
"body": "El código de salida de la aplicación no llega al host, así que una salida limpia y un fallo se ven igual y ambos se reinician, como hacen <code>always</code> y <code>unless-stopped</code> en Docker. Una parada pedida fuera de Proxmox, con <code>lxc-stop</code> o <code>systemctl</code>, no deja tarea de parada y se toma como una parada propia."
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "restore",
|
||||
"title": "Backup, restauración y otro host",
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
"Qué cambia en un contenedor OCI"
|
||||
],
|
||||
"rows": [
|
||||
[
|
||||
"Estado",
|
||||
"Un interruptor <strong>Vigilancia</strong> bajo Iniciar al arrancar: la aplicación se inicia de nuevo cuando se detiene sola"
|
||||
],
|
||||
[
|
||||
"App",
|
||||
"La aplicación se identifica desde el registro y sus actualizaciones se siguen por la imagen"
|
||||
|
||||
Reference in New Issue
Block a user