Restart defguard-service automatically after upgrading the .deb package

未关闭
#4,007 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
linux, rust
领域
devops

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Rust
星标
2.9k
派生
121
平均合并
20 小时 19 分钟
30 天内合并 PR
76

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DefGuard/defguard 的其他 Issue

查看 DefGuard/defguard 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。