Plugin removed after a boot without internet access

Aperta
#47 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python, shell
Ambito
devops, tooling

Direzione di ricerca

Start by reading the plugin install definition in apprise.plg and compare its boot-time downloads with the files already cached under /boot/config/plugins/apprise/. Check how the plugin manager handles download failures, then test a boot with internet access unavailable. Done means the plugin reinstalls from cached files and notifications remain available without a network connection.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Environment: Unraid 7.3.3, Apprise plugin 0.2.1 (apprise-go v0.4.0), single Apprise agent target (json:// webhook to Home Assistant).

What happened

  • Nov 2: updated the plugin from the Plugins page. The update completed, notifications kept working.

  • Nov 6, ~23:29: short power outage (~2 minutes) took down both the server and the router. The server booted at 23:30:40, while the router was still starting.

  • Nov 6, 23:32: first failed notification. From then on every Unraid notification ended in the syslog as:

    Apprise_Notification_Agent.sh: Failed sending notification (apprise command not found)
    
  • Nov 8: noticed the error in the syslog. Apprise was gone from Installed Plugins, and apprise.plg (dated Nov 2) was in /boot/config/plugins-error/. Reinstalled it from CA; the configuration survived and a test notification went through.

Notifications were silently lost for two days. Nothing in the UI pointed at the problem.

Plugin install log from the boot on Nov 6

Nov 6 23:31:16 plugin-manager: executing inline script: /bin/bash '/tmp/inline1-apprise.sh'
Nov 6 23:31:16 plugin-manager: checking: /boot/config/plugins/apprise/apprise-go-linux-amd64-v0.4.0 - MD5
Nov 6 23:31:16 plugin-manager: skipping: /boot/config/plugins/apprise/apprise-go-linux-amd64-v0.4.0 already exists
Nov 6 23:31:16 plugin-manager: checking: /boot/config/plugins/apprise/apprise.png - MD5
Nov 6 23:31:16 plugin-manager: skipping: /boot/config/plugins/apprise/apprise.png already exists
Nov 6 23:31:16 plugin-manager: creating: /usr/local/emhttp/plugins/dynamix/agents/Apprise.xml - downloading from URL "https://raw.githubusercontent.com/unraid/apprise-plugin/v0.2.1/agents/Apprise.xml"
Nov 6 23:31:20 rc.local: plugin: installing: apprise.plg
Nov 6 23:31:20 rc.local: plugin: downloading: Apprise.xml ...plugin: Apprise.xml download failure: Network failure

My theory: the binary is cached under /boot/config/plugins/apprise/, but Apprise.xml, the relay scripts, README and license files go straight to /usr/local/emhttp/ and seem to be downloaded on every boot. A boot without internet access, as here while the router was still starting, would then fail the install and get the plugin moved to plugins-error.

Expected: a boot without internet access reinstalls the plugin from what is already on /boot. Caching every file the plugin needs at runtime under /boot/config/plugins/apprise/, as is already done for the binary, would cover that.

Possibly related to #44, which reports the same symptom.

Lingua principale
Python
Stelle
1
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di unraid/apprise-plugin

Tutte le issue di unraid/apprise-plugin

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.