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

オープン
#1,109 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/mintupdate のほかの issue

linuxmint/mintupdate の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。