Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions mac-app/Sources/CloudMachineCore/BackupHealth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,19 @@ public enum BackupHealth {
age.map { $0 <= rebindTimeLimit } ?? false
}

/// A new rclone is rebound by punchfs's own start (seconds later) or by cm-smb-heal (every
/// minute): one nobody rebound for longer was missed.
public static let rebindPidGrace: TimeInterval = 5 * 60

/// rclone-tm runs as a process the last rebind did not see (`VMStatus.NotRebound`): a note
/// while a rebind reads or within `rebindPidGrace` of its start, a failure after that.
public static func rcloneNotReboundIsAFailure(age: TimeInterval?, rebindingAge: TimeInterval?)
-> Bool
{
if rebindStillReading(rebindingAge) { return false }
return age.map { $0 > rebindPidGrace } ?? true
}

public static func evaluate(
lastSuccess: Date?,
lastAttempt: Date?,
Expand Down Expand Up @@ -231,6 +244,8 @@ public enum BackupHealth {
vfsUnboundBands: Int? = nil,
// Seconds a cm-vfs-guard run has been reading (`VMStatus.Report.vfsRebindingAge`).
vfsRebindingAge: TimeInterval? = nil,
// rclone-tm runs as a process the last rebind did not see (`VMStatus.Report.vfsNotRebound`).
vfsNotRebound: VMStatus.NotRebound? = nil,
maxAgeHours: Double = BackupHealth.maxAgeHours,
// Whether the startup grace period is in progress - see `startupGraceMinutes`.
withinStartupGrace: Bool = false,
Expand Down Expand Up @@ -571,6 +586,21 @@ public enum BackupHealth {
}
}

// rclone restarted and its bands waiting for upload were not read (review of #80).
if let vfsNotRebound {
let missed = Problem(
summary: L10n.tr("rclone restarted and was not rebound (pid %@)", "\(vfsNotRebound.pid)"),
detail: L10n.tr(
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard"
),
code: "rclone-not-rebound")
if rcloneNotReboundIsAFailure(age: vfsNotRebound.age, rebindingAge: vfsRebindingAge) {
problems.append(missed)
} else {
notices.append(missed)
}
}

if let uploadStalledFor {
problems.append(
Problem(
Expand Down Expand Up @@ -846,6 +876,7 @@ public enum BackupHealth {
uploadLimitStorageFull: report?.uploadLimitStorageFull ?? false,
vfsUnboundBands: report?.vfsUnboundBands,
vfsRebindingAge: report?.vfsRebindingAge,
vfsNotRebound: report?.vfsNotRebound,
maxAgeHours: maxAgeHours,
// The REAL clock, not `now`: tests substitute a `now` from the past, and
// uptime computed from it would come out negative, i.e. "startup in
Expand Down
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nPolish+VM.swift
Original file line number Diff line number Diff line change
Expand Up @@ -361,5 +361,11 @@ extension L10nPolish {
"Ochrona restartu: pasma niezabezpieczone po restarcie rclone: %@ - Samba pozostaje wyłączona, dopóki nie zostaną odczytane (cm-smb-heal ponawia co minutę)",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Nie wszystko jest jeszcze na Dysku Google (pliki czekające na wysłanie: %@, zmienione pliki w buforze: %@). Restart maszyny teraz może przywrócić je jako zera. Poczekaj, aż wysyłka się skończy (cloudmachine-agent vm-status), i uruchom vm-update ponownie.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Ochrona restartu: rclone (pid %@) niepowiązany ponownie od startu %@ temu (ostatnie powiązanie: pid %@) - cm-smb-heal ponawia powiązanie co minutę",
"rclone restarted and was not rebound (pid %@)":
"rclone uruchomiony ponownie bez ponownego powiązania (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm działa jako proces, dla którego ochrona restartu nie odczytała pasm (ostatnie powiązanie dotyczyło innego): pasmo wysłane, zanim zostanie odczytane, może wrócić jako zera. cm-smb-heal co minutę uruchamia pełne ponowne powiązanie. Sprawdź: cloudmachine-agent vm-status, potem w maszynie: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+ar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"حتى مع حد Google البالغ 750 جيجابايت يوميًا، تكتمل النسخة الاحتياطية الأولى عادةً خلال أيام قليلة. تحقق من: tmutil status و cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"لم يُرفع كل شيء إلى Google Drive بعد (%@ ملف/ملفات بانتظار الرفع، %@ ملف/ملفات متغيرة في ذاكرة التخزين المؤقت). إعادة تشغيل الجهاز الآن قد تعيدها أصفارًا. انتظر حتى ينتهي الرفع (cloudmachine-agent vm-status)، ثم شغّل vm-update مجددًا.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"حماية إعادة التشغيل: rclone (pid %@) لم يُعَد ربطه منذ بدئه قبل %@ (آخر ربط: pid %@) - يعيد cm-smb-heal ربطه كل دقيقة",
"rclone restarted and was not rebound (pid %@)":
"أُعيد تشغيل rclone ولم يُعَد ربطه (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"يعمل rclone-tm كعملية لم تقرأ حماية إعادة التشغيل أشرطتها (آخر ربط كان لعملية أخرى): الشريط الذي يُرفع قبل قراءته قد يعود أصفارًا. يبدأ cm-smb-heal إعادة ربط كاملة كل دقيقة. تحقق: cloudmachine-agent vm-status، ثم داخل الآلة: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+da.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Selv med Googles grænse på 750 GB i døgnet bliver en første backup normalt færdig på få dage. Kontrollér: tmutil status og cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Ikke alt er på Google Drev endnu (%@ fil(er) venter på upload, %@ ændret/ændrede fil(er) i cachen). En genstart af maskinen nu kan give dem tilbage som nuller. Vent, til uploaden er færdig (cloudmachine-agent vm-status), og kør derefter vm-update igen.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Genstartsvagt: rclone (pid %@) ikke genbundet siden start for %@ siden (sidste genbinding: pid %@) - cm-smb-heal genbinder det hvert minut",
"rclone restarted and was not rebound (pid %@)":
"rclone genstartet og ikke genbundet (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm kører som en proces, genstartsvagten ikke har læst for (sidste genbinding gjaldt en anden): et bånd, der uploades, før det er læst, kan komme tilbage som nuller. cm-smb-heal starter en fuld genbinding hvert minut. Tjek: cloudmachine-agent vm-status, derefter i maskinen: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+de.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Selbst beim Google-Limit von 750 GB pro Tag ist ein erstes Backup normalerweise nach wenigen Tagen fertig. Prüfen: tmutil status und cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Noch ist nicht alles in Google Drive (%@ Datei(en) warten auf den Upload, %@ geänderte Datei(en) im Cache). Ein Neustart der Maschine jetzt kann sie als Nullen zurückbringen. Warten Sie, bis der Upload fertig ist (cloudmachine-agent vm-status), und führen Sie dann vm-update erneut aus.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Neustartschutz: rclone (PID %@) seit dem Start vor %@ nicht neu gebunden (letzte Bindung: PID %@) – cm-smb-heal bindet es jede Minute neu",
"rclone restarted and was not rebound (pid %@)":
"rclone neu gestartet und nicht neu gebunden (PID %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm läuft als Prozess, für den der Neustartschutz nichts gelesen hat (die letzte Bindung galt einem anderen): Ein Band, das vor dem Lesen hochgeladen wird, kann als Nullen zurückkommen. cm-smb-heal startet jede Minute eine vollständige Neubindung. Prüfen: cloudmachine-agent vm-status, dann in der Maschine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+es.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Incluso con el límite de Google de 750 GB al día, una primera copia suele terminar en pocos días. Comprobar: tmutil status y cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Todavía no está todo en Google Drive (%@ archivo(s) esperando la subida, %@ archivo(s) modificado(s) en la caché). Reiniciar la máquina ahora puede devolverlos como ceros. Espera a que termine la subida (cloudmachine-agent vm-status) y vuelve a ejecutar vm-update.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Guarda reinicio: rclone (pid %@) sin revincular desde que arrancó hace %@ (última revinculación: pid %@); cm-smb-heal lo revincula cada minuto",
"rclone restarted and was not rebound (pid %@)":
"rclone reiniciado y sin revincular (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm se ejecuta como un proceso para el que la guarda de reinicio no ha leído nada (la última revinculación fue para otro): una banda subida antes de leerse puede volver como ceros. cm-smb-heal inicia una revinculación completa cada minuto. Comprueba: cloudmachine-agent vm-status y luego, en la máquina: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+fi.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Googlen 750 Gt:n vuorokausirajankin kanssa ensimmäinen varmuuskopio valmistuu yleensä muutamassa päivässä. Tarkista: tmutil status ja cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Kaikki ei ole vielä Google Drivessa (%@ tiedosto(a) odottaa lähetystä, %@ muuttunut(tta) tiedosto(a) välimuistissa). Koneen uudelleenkäynnistys nyt voi palauttaa ne nollina. Odota, kunnes lähetys on valmis (cloudmachine-agent vm-status), ja suorita sitten vm-update uudelleen.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Käynnistysvahti: rclonea (pid %@) ei ole sidottu uudelleen käynnistyksen jälkeen %@ sitten (viimeisin sidonta: pid %@) - cm-smb-heal sitoo sen joka minuutti",
"rclone restarted and was not rebound (pid %@)":
"rclone käynnistyi uudelleen eikä sitä sidottu (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm toimii prosessina, jolle käynnistysvahti ei ole lukenut kaistoja (viimeisin sidonta koski toista): ennen lukemista lähetetty kaista voi palata nollina. cm-smb-heal aloittaa täyden uudelleensidonnan joka minuutti. Tarkista: cloudmachine-agent vm-status, sitten koneessa: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+fr.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Même avec la limite Google de 750 Go par jour, une première sauvegarde se termine normalement en quelques jours. Vérifier : tmutil status et cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Tout n'est pas encore sur Google Drive (%@ fichier(s) en attente d'envoi, %@ fichier(s) modifié(s) dans le cache). Redémarrer la machine maintenant peut les rendre remplis de zéros. Attendez la fin de l'envoi (cloudmachine-agent vm-status), puis relancez vm-update.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Garde redémarrage : rclone (pid %@) non relié depuis son démarrage il y a %@ (dernier reliage : pid %@) – cm-smb-heal le relie chaque minute",
"rclone restarted and was not rebound (pid %@)":
"rclone redémarré et non relié (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm tourne dans un processus pour lequel la garde de redémarrage n'a rien lu (le dernier reliage concernait un autre) : une bande envoyée avant d'être lue peut revenir sous forme de zéros. cm-smb-heal lance un reliage complet chaque minute. Vérifiez : cloudmachine-agent vm-status, puis dans la machine : journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+he.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"גם עם מגבלת Google של 750 GB ליום, גיבוי ראשון מסתיים בדרך כלל תוך ימים ספורים. יש לבדוק: tmutil status ו-cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"עדיין לא הכול נמצא ב-Google Drive (%@ קבצים ממתינים להעלאה, %@ קבצים שהשתנו במטמון). הפעלה מחדש של המכונה עכשיו עלולה להחזיר אותם כאפסים. המתינו לסיום ההעלאה (cloudmachine-agent vm-status), ואז הריצו שוב vm-update.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"הגנת הפעלה מחדש: rclone (pid %@) לא נקשר מחדש מאז שהופעל לפני %@ (קישור אחרון: pid %@) - cm-smb-heal קושר אותו מחדש בכל דקה",
"rclone restarted and was not rebound (pid %@)":
"rclone הופעל מחדש ולא נקשר מחדש (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm רץ כתהליך שהגנת ההפעלה מחדש לא קראה עבורו (הקישור האחרון היה לתהליך אחר): רצועה שהועלתה לפני שנקראה עלולה לחזור כאפסים. cm-smb-heal מתחיל קישור מחדש מלא בכל דקה. בדוק: cloudmachine-agent vm-status, ואז בתוך המכונה: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
6 changes: 6 additions & 0 deletions mac-app/Sources/CloudMachineCore/L10nTranslations+it.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1136,5 +1136,11 @@ extension L10nTranslations {
"Anche con il limite di Google di 750 GB al giorno, una prima copia di norma finisce in pochi giorni. Controllare: tmutil status e cloudmachine-agent vm-status",
"Not everything is on Google Drive yet (%@ file(s) waiting to upload, %@ changed file(s) in the cache). Restarting the machine now can bring them back as zeros. Wait until the upload is done (cloudmachine-agent vm-status), then run vm-update again.":
"Non tutto è ancora su Google Drive (%@ file in attesa di caricamento, %@ file modificati nella cache). Riavviare ora la macchina può restituirli pieni di zeri. Attendi la fine del caricamento (cloudmachine-agent vm-status), poi esegui di nuovo vm-update.",
"Restart guard: rclone (pid %@) not rebound since it started %@ ago (last rebind: pid %@) - cm-smb-heal rebinds it every minute":
"Guardia riavvio: rclone (pid %@) non ricollegato dall'avvio %@ fa (ultimo ricollegamento: pid %@) - cm-smb-heal lo ricollega ogni minuto",
"rclone restarted and was not rebound (pid %@)":
"rclone riavviato e non ricollegato (pid %@)",
"rclone-tm runs as a process the restart guard has not read for (the last rebind was for another one): a band uploaded before it is read can come back as zeros. cm-smb-heal starts a whole rebind every minute. Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard":
"rclone-tm gira come un processo per cui la guardia riavvio non ha letto nulla (l'ultimo ricollegamento era per un altro): una banda caricata prima di essere letta può tornare come zeri. cm-smb-heal avvia un ricollegamento completo ogni minuto. Controlla: cloudmachine-agent vm-status, poi nella macchina: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard",
]
}
Loading
Loading