Restart defguard-service automatically after upgrading the .deb package

Aperta
#4,007 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, rust
Ambito
devops

Direzione di ricerca

Start by locating the .deb packaging configuration and its post-install or systemd service handling; the issue does not name the relevant files. Check how upgrades currently handle defguard-service, then compare the package hooks with Debian’s systemd restart mechanisms. Done when upgrading the .deb restarts the service so it uses the installed version; the optional UI error change is separate.

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

Descrizione

feature

Is your feature request related to a problem? Please describe.

After upgrading the Defguard desktop client via the .deb package, connecting to a VPN location fails with “Connection failed”. The server side looks fine: authentication succeeds and the core logs show a successful login.

The client log shows that it cannot reach the local daemon:

[ERROR][Client] Problem connecting to UNIX domain socket: Connection refused (os error 111)
[ERROR][Client] Failed to push service locations to the daemon ... code: 'The service is currently unavailable'

Restarting the service manually (sudo systemctl restart defguard-service) fixes it immediately. It appears that the package upgrade does not restart the already running daemon, so the new client talks to an old or non-functional service instance. The error message in the UI (“Connection failed”) doesn’t hint at the daemon being the problem, so it took me a while to find the cause.

Environment:
Tuxedo OS, client 2.1.1 → 2.1.2, installed via .deb.

Describe the solution you’d like

Ideally the package’s post-install script restarts defguard-service after an upgrade (e.g. via deb-systemd-invoke restart or dh_installsystemd), so that the daemon always matches the installed client version.

Optionally, the client could show a clearer error in the UI when it cannot reach the daemon, e.g. “Cannot connect to defguard-service. Is the service running?”.

Describe alternatives you’ve considered

  • Restarting the service manually after every update. This works, but it is easy to forget and hard to diagnose if you don’t know about it.
  • Rebooting the machine, which also works but is heavy-handed.
Lingua principale
Rust
Stelle
2.9k
Fork
121
Merge medio
19h 20m
PR unite (30g)
80

Preparare l'ambiente

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 DefGuard/defguard

Tutte le issue di DefGuard/defguard

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.