SystemdUser: Persistent=true runs missed jobs at boot before the network is up, so network jobs fail on every boot
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- linux, typescript
- Ambito
- devops, networking
Direzione di ricerca
Start with LIFEOS/TOOLS/lib/SystemdUser.ts and inspect renderService, then look for tests covering generated systemd units. Check how the installer detects nm-online and how calendar, interval, and daemon units are rendered. Done means calendar jobs wait for NetworkManager when available, with a timeout, while interval jobs, daemons, and machines without nm-online keep their current behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
On Linux, LIFEOS/TOOLS/lib/SystemdUser.ts renders each scheduled job as a systemd --user oneshot service plus a timer with Persistent=true. When the machine was off at the scheduled time, Persistent=true runs the missed job as soon as the user manager starts at boot. That is before NetworkManager has connected, so every job that calls the network fails on the first run after each boot.
Observed
Over 12 days, com.lifeos.commitmentsweep and com.lifeos.modelsync failed on each of the three boot catch-up runs and on no other run:
| Event | Time |
|---|---|
| user manager starts both jobs | 08:20:21 |
both exit 1 (error connecting to api.github.com) |
08:20:22 |
NetworkManager: state is now CONNECTED_GLOBAL |
08:20:28 |
User units cannot order themselves after the system network-online.target, because the user manager does not see system targets.
Fix we run locally
renderService adds this line to every calendar (OnCalendar=) unit, only when nm-online is found on the machine at install time:
ExecStartPre=-/usr/bin/nm-online -q -t 60
When the network is already up, it returns at once. At boot, it waits the few seconds until NetworkManager connects. The leading - lets a 60 s timeout fall through to the job, which then fails visibly as before. Interval units and daemons are left as they were: offline, an interval job every few minutes would wait 60 s on every run, and none of ours failed at boot. Machines without NetworkManager (for example macOS, or systemd-networkd) render the unit unchanged.
- Lingua principale
- TypeScript
- Stelle
- 19.9k
- Fork
- 2.5k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di danielmiessler/LifeOS
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
danielmiessler/LifeOS#2894 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
danielmiessler/LifeOS#2891 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
danielmiessler/LifeOS#2888 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
danielmiessler/LifeOS#2886 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
danielmiessler/LifeOS#2848 ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di danielmiessler/LifeOS
Issue simili
-
[功能请求] 设置选项语言调整Aperta功能请求
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
antithesishq/bombadil#473 ·
I maintainer di solito rispondono entro 2 giorni
-
The structured output reference promises null results for refusals that carry validation detailsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
mattermost/mattermost-mobile#10358 ·
I maintainer di solito rispondono entro 1 giorno
-
ready-for-agent
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
LucasSantana-Dev/Lucky#3257 ·
I maintainer di solito rispondono entro 1 giorno