Automatic upgrade starts right after resume, before the network is up, and installs nothing

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
linux, python
领域
backend, devops

调研方向

Start by reading the mintupdate-automation-upgrade.timer and service configuration, then trace how the upgrade is triggered after suspend or hibernate and how it depends on NetworkManager. The journal and mintupdate.log examples show the failure window and the misleading successful exit status. Done means an automatic run waits until networking is usable after resume and reports or handles a failed cache refresh appropriately.

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

描述

Linux Mint 22.3, mintupdate 7.1.4, laptop on Wi-Fi that is usually asleep or hibernated at midnight.

When the daily time passes while the machine is asleep, mintupdate-automation-upgrade.timer (Persistent=true) starts the service as soon as it wakes up. On this laptop that is 0.1 to 0.2 seconds after resume, while NetworkManager is still disconnected. mintupdate-cli then can't resolve any repository and nothing gets installed. The next attempt is the following day.

The service has After=network-online.target, but that target is reached once at boot and stays active through suspend, so it doesn't hold the service back on resume.

One example from the journal:

Oct 22 13:51:22.693 systemd-sleep: System returned from sleep operation 'hibernate'.
Oct 22 13:51:22.829 systemd: Starting mintupdate-automation-upgrade.service - Update Manager automatic upgrades...
Oct 22 13:51:24.282 NetworkManager: manager: NetworkManager state is now DISCONNECTED
Oct 22 13:51:28.059 NetworkManager: manager: NetworkManager state is now CONNECTED_GLOBAL
Oct 22 13:51:35.931 systemd: Finished mintupdate-automation-upgrade.service - Update Manager automatic upgrades.

and the matching part of /var/log/mintupdate.log:

W:Failed to fetch https://mirror.vnet.sk/ubuntu/dists/noble/InRelease  Could not resolve 'mirror.vnet.sk'
[same for every other repository]
Error: mint-refresh-cache could not update the cache.

Between Oct 5 and Oct 29 there were 25 automatic runs. 10 failed like this, and 9 of those 10 started within 0.2 s of a resume from suspend or hibernate. Four days in a row (Oct 22 to 25) got no updates.

The service still exits with status 0 after these runs, so systemctl reports them as successful and the only trace is in mintupdate.log.

主要语言
Python
星标
424
派生
191
平均合并
23 天 14 小时
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

linuxmint/mintupdate 的其他 Issue

查看 linuxmint/mintupdate 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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