Restart defguard-service automatically after upgrading the .deb package

Abierto
#4,007 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
58/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
linux, rust
Área
devops

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Rust
Estrellas
2.9k
Forks
121
Merge medio
19 h 20 min
PR fusionados (30 d)
80

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DefGuard/defguard

Todos los issues de DefGuard/defguard

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.