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

Aperta
#1,109 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, python
Ambito
backend, devops

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
Python
Stelle
424
Fork
191
Merge medio
23g 14h
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 linuxmint/mintupdate

Tutte le issue di linuxmint/mintupdate

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.