diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c17b9af..e5e88c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,9 @@ jobs: run: shellcheck --severity=warning vm/*.sh vm/punchfs/*.sh - name: shellcheck (live tests) run: shellcheck --severity=error vm/tests/*.sh + # Ubuntu's /bin/sh is dash: the restart guard and its live test must not lean on bash. + - name: shellcheck (dash) + run: shellcheck -s dash vm/cm-vfs-guard.sh vm/tests/vfs-restart.sh build-app: name: Build Swift package diff --git a/mac-app/Sources/CloudMachineCore/BackupHealth.swift b/mac-app/Sources/CloudMachineCore/BackupHealth.swift index c73099b..4891b67 100644 --- a/mac-app/Sources/CloudMachineCore/BackupHealth.swift +++ b/mac-app/Sources/CloudMachineCore/BackupHealth.swift @@ -190,6 +190,14 @@ public enum BackupHealth { /// The share and SMB probes say something only while Samba is meant to run. public static func probesApply(_ report: VMStatus.Report?) -> Bool { report?.smbdHeld != true } + /// punchfs's `TimeoutStartSec` (vm/systemd/punchfs.service): a cm-vfs-guard run reading + /// longer than this was killed, or hangs. + public static let rebindTimeLimit: TimeInterval = 20 * 60 + + public static func rebindStillReading(_ age: TimeInterval?) -> Bool { + age.map { $0 <= rebindTimeLimit } ?? false + } + public static func evaluate( lastSuccess: Date?, lastAttempt: Date?, @@ -219,6 +227,10 @@ public enum BackupHealth { uploadStalledFor: TimeInterval? = nil, // The refusal was `storageQuotaExceeded`: the Drive is full (`VMStatus.Report`). uploadLimitStorageFull: Bool = false, + // Bands an rclone restart left unread (`VMStatus.Report.vfsUnboundBands`); `nil` = none. + vfsUnboundBands: Int? = nil, + // Seconds a cm-vfs-guard run has been reading (`VMStatus.Report.vfsRebindingAge`). + vfsRebindingAge: TimeInterval? = nil, maxAgeHours: Double = BackupHealth.maxAgeHours, // Whether the startup grace period is in progress - see `startupGraceMinutes`. withinStartupGrace: Bool = false, @@ -538,6 +550,27 @@ public enum BackupHealth { } } + // Samba is off on purpose: a band uploaded before cm-vfs-guard read it may come back as + // zeros (30.11.2026). Not "a service is down" alone: the person learns why. + if let vfsUnboundBands { + let unbound = + Problem( + summary: L10n.tr( + "%@ band(s) not secured after an rclone restart", + vfsUnboundBands > 0 ? "\(vfsUnboundBands)" : "?"), + detail: L10n.tr( + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard" + ), + code: "bands-not-secured") + // Every rclone restart runs a rebind (up to 15 min): a note while it reads, a failure + // once it is past punchfs's start timeout or has ended with bands left. + if rebindStillReading(vfsRebindingAge) { + notices.append(unbound) + } else { + problems.append(unbound) + } + } + if let uploadStalledFor { problems.append( Problem( @@ -811,6 +844,8 @@ public enum BackupHealth { lastUploadAge: report?.lastUploadAge, uploadStalledFor: report.flatMap(VMStatus.uploadStalledFor), uploadLimitStorageFull: report?.uploadLimitStorageFull ?? false, + vfsUnboundBands: report?.vfsUnboundBands, + vfsRebindingAge: report?.vfsRebindingAge, 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 diff --git a/mac-app/Sources/CloudMachineCore/DriveEncryption.swift b/mac-app/Sources/CloudMachineCore/DriveEncryption.swift index 30533fc..e461bab 100644 --- a/mac-app/Sources/CloudMachineCore/DriveEncryption.swift +++ b/mac-app/Sources/CloudMachineCore/DriveEncryption.swift @@ -377,6 +377,26 @@ public enum DriveEncryption { } } + /// Shell words for `rm -rf`: `cachePaths`, plus the `{hash}` folders rclone + /// uses for a remote with config overrides (the mount's --drive-* flags; cmtest + /// 30.11.2026: `gdrive{7LdmB}`). The `{*}` stays outside the quotes: bash does not + /// brace-expand it, the `*` globs; with no match `rm -f` gets the literal path. + static func cacheRemovalWords(remote: String, cacheDir: String = VMLayout.Guest.cacheDir) + -> [String] + { + let parts = remote.split(separator: ":", maxSplits: 1).map(String.init) + let name = parts[0] + let path = parts.count > 1 ? parts[1] : "" + let plain = cachePaths(remote: remote).map { + VMLayout.shellQuoted($0.replacingOccurrences(of: VMLayout.Guest.cacheDir, with: cacheDir)) + } + let hashed = ["vfs", "vfsMeta"].map { + VMLayout.shellQuoted("\(cacheDir)/\($0)/\(name)") + "{*}" + + (path.isEmpty ? "" : VMLayout.shellQuoted("/\(path)")) + } + return plain + hashed + } + /// Points the machine at `newRemote`. Runs after `finalSyncScript`; Samba /// was stopped before that sync (`move`), so nothing has written since. /// @@ -414,7 +434,7 @@ public enum DriveEncryption { "trap 'echo \"FAILED - the previous folder is back\" >&2; restore' ERR", "systemctl stop tm-bands-bind punchfs rclone-tm", "printf '%s\\n' \(VMLayout.shellQuoted(VMLayout.envLine("CM_REMOTE", newRemote))) > \(env)", - "rm -rf " + cachePaths(remote: oldRemote).map(VMLayout.shellQuoted).joined(separator: " "), + "rm -rf " + cacheRemovalWords(remote: oldRemote).joined(separator: " "), "systemctl start rclone-tm punchfs tm-bands-bind", "mountpoint -q \"$B\"", "after=$(find \"$B/\" -type f | wc -l)", diff --git a/mac-app/Sources/CloudMachineCore/L10nPolish+VM.swift b/mac-app/Sources/CloudMachineCore/L10nPolish+VM.swift index 7fc3b4e..446355b 100644 --- a/mac-app/Sources/CloudMachineCore/L10nPolish+VM.swift +++ b/mac-app/Sources/CloudMachineCore/L10nPolish+VM.swift @@ -353,5 +353,13 @@ extension L10nPolish { "Na udziale maszyny jest otwartych sesji SMB: %@. Restart maszyny teraz przerwałby je w środku pracy Time Machine. Wysuń dysk kopii na Macu albo poczekaj, aż się zamkną (listę pokazuje smbstatus -b w maszynie), i uruchom vm-update ponownie.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ nie odpowiada - maszyna nie zostanie zrestartowana, dopóki nie wiadomo, czy Time Machine używa udziału.", + "%@ band(s) not secured after an rclone restart": + "Pasma niezabezpieczone po restarcie rclone: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine pozostaje wyłączony, dopóki nie zostaną zabezpieczone: pasmo wysłane, zanim zostało odczytane po restarcie, może wrócić jako zera. Maszyna ponawia odczyt co minutę (cm-smb-heal). Sprawdź: cloudmachine-agent vm-status, potem w maszynie: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+ar.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+ar.swift index 39f562e..6374e85 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+ar.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+ar.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "عدد جلسات SMB المفتوحة على مشاركة الجهاز: %@. إعادة التشغيل الآن ستقطعها أثناء عمل Time Machine. أخرج قرص النسخ الاحتياطي على الـ Mac أو انتظر حتى تُغلق (يعرضها smbstatus -b داخل الجهاز)، ثم شغّل vm-update مجددًا.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ لم يستجب - لن يُعاد تشغيل الجهاز ما دام غير معروف هل يستخدم Time Machine المشاركة.", + "%@ band(s) not secured after an rclone restart": + "أشرطة غير مؤمَّنة بعد إعادة تشغيل rclone: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "يبقى Time Machine متوقفًا حتى يتم تأمينها: الشريط الذي رُفع قبل قراءته بعد إعادة التشغيل قد يعود أصفارًا. تعيد الآلة قراءتها كل دقيقة (cm-smb-heal). تحقق: cloudmachine-agent vm-status، ثم داخل الآلة: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "حماية إعادة التشغيل: أشرطة غير مؤمَّنة بعد إعادة تشغيل rclone: %@ - يبقى Samba متوقفًا حتى تُقرأ (يعيد cm-smb-heal المحاولة كل دقيقة)", "First backup in progress: %@": "النسخة الاحتياطية الأولى قيد التنفيذ: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "لم تكتمل النسخة الاحتياطية الأولى خلال %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "حتى مع حد 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 مجددًا.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+da.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+da.swift index 94bb41e..2d6ff42 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+da.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+da.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Der er %@ åbne SMB-sessioner på maskinens deling. Hvis maskinen genstartes nu, afbrydes de midt i Time Machines arbejde. Skub backupdisken ud på Mac'en, eller vent til de lukkes (smbstatus -b i maskinen viser dem), og kør derefter vm-update igen.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ svarede ikke - maskinen genstartes ikke, så længe det er ukendt, om Time Machine bruger delingen.", + "%@ band(s) not secured after an rclone restart": + "%@ bånd ikke sikret efter en genstart af rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine forbliver slået fra, indtil de er sikret: et bånd, der blev uploadet før det blev læst efter genstarten, kan komme tilbage som nuller. Maskinen læser dem igen hvert minut (cm-smb-heal). Tjek: cloudmachine-agent vm-status, derefter i maskinen: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Genstartsvagt: %@ bånd ikke sikret efter en genstart af rclone - Samba forbliver slået fra, indtil de er læst (cm-smb-heal prøver igen hvert minut)", "First backup in progress: %@": "Første backup i gang: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Den første backup er ikke afsluttet på %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+de.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+de.swift index b0680b3..3d10508 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+de.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+de.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Auf der Freigabe der Maschine sind %@ SMB-Sitzungen offen. Ein Neustart würde sie mitten in der Arbeit von Time Machine unterbrechen. Werfen Sie das Backup-Volume am Mac aus oder warten Sie, bis sie geschlossen sind (smbstatus -b in der Maschine zeigt sie), und führen Sie dann vm-update erneut aus.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ hat nicht geantwortet – die Maschine wird nicht neu gestartet, solange unbekannt ist, ob Time Machine die Freigabe nutzt.", + "%@ band(s) not secured after an rclone restart": + "%@ Band(s) nach einem rclone-Neustart nicht gesichert", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine bleibt aus, bis sie gesichert sind: Ein Band, das vor dem Lesen nach dem Neustart hochgeladen wurde, kann als Nullen zurückkommen. Die Maschine liest sie jede Minute erneut (cm-smb-heal). Prüfen: cloudmachine-agent vm-status, dann in der Maschine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Neustartschutz: %@ Band(s) nach einem rclone-Neustart nicht gesichert – Samba bleibt aus, bis sie gelesen sind (cm-smb-heal versucht es jede Minute erneut)", "First backup in progress: %@": "Erstes Backup läuft: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Das erste Backup ist in %@ nicht abgeschlossen worden", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+es.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+es.swift index dec9dd1..24074e9 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+es.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+es.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Hay %@ sesiones SMB abiertas en el recurso compartido de la máquina. Reiniciarla ahora las cortaría en pleno trabajo de Time Machine. Expulsa el disco de copia en el Mac o espera a que se cierren (smbstatus -b en la máquina las muestra) y vuelve a ejecutar vm-update.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ no respondió: la máquina no se reiniciará mientras no se sepa si Time Machine usa el recurso compartido.", + "%@ band(s) not secured after an rclone restart": + "%@ banda(s) sin asegurar tras un reinicio de rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine sigue detenido hasta que lo estén: una banda subida antes de leerse tras el reinicio puede volver como ceros. La máquina las vuelve a leer cada minuto (cm-smb-heal). Comprueba: cloudmachine-agent vm-status y, en la máquina: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Guarda reinicio: %@ banda(s) sin asegurar tras un reinicio de rclone; Samba sigue detenido hasta leerlas (cm-smb-heal reintenta cada minuto)", "First backup in progress: %@": "Primera copia en curso: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "La primera copia no ha terminado en %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+fi.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+fi.swift index 98505a1..9f1e8e7 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+fi.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+fi.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Koneen jaossa on %@ avointa SMB-istuntoa. Uudelleenkäynnistys katkaisisi ne kesken Time Machinen työn. Poista varmuuskopiolevy Macissa tai odota, että istunnot sulkeutuvat (smbstatus -b koneessa näyttää ne), ja suorita sitten vm-update uudelleen.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ ei vastannut - konetta ei käynnistetä uudelleen, kun ei tiedetä, käyttääkö Time Machine jakoa.", + "%@ band(s) not secured after an rclone restart": + "%@ kaistaa ei turvattu rclonen uudelleenkäynnistyksen jälkeen", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine pysyy pois päältä, kunnes ne on turvattu: kaista, joka lähetettiin ennen kuin se luettiin uudelleenkäynnistyksen jälkeen, voi palata nollina. Kone lukee ne uudelleen joka minuutti (cm-smb-heal). Tarkista: cloudmachine-agent vm-status, sitten koneessa: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Käynnistysvahti: %@ kaistaa ei turvattu rclonen uudelleenkäynnistyksen jälkeen - Samba pysyy pois päältä, kunnes ne on luettu (cm-smb-heal yrittää joka minuutti)", "First backup in progress: %@": "Ensimmäinen varmuuskopio käynnissä: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Ensimmäinen varmuuskopio ei ole valmistunut ajassa %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+fr.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+fr.swift index 5df060f..617175f 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+fr.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+fr.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "%@ session(s) SMB sont ouvertes sur le partage de la machine. Redémarrer maintenant les couperait en plein travail de Time Machine. Éjectez le disque de sauvegarde sur le Mac ou attendez leur fermeture (smbstatus -b dans la machine les liste), puis relancez vm-update.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ n'a pas répondu - la machine n'est pas redémarrée tant qu'on ignore si Time Machine utilise le partage.", + "%@ band(s) not secured after an rclone restart": + "%@ bande(s) non sécurisée(s) après un redémarrage de rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine reste arrêté jusqu'à ce qu'elles le soient : une bande envoyée avant d'avoir été lue après le redémarrage peut revenir sous forme de zéros. La machine les relit chaque minute (cm-smb-heal). Vérifier : cloudmachine-agent vm-status, puis dans la machine : journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Garde redémarrage : %@ bande(s) non sécurisée(s) après un redémarrage de rclone – Samba reste arrêté jusqu'à leur lecture (cm-smb-heal réessaie chaque minute)", "First backup in progress: %@": "Première sauvegarde en cours : %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "La première sauvegarde n'est pas terminée après %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+he.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+he.swift index 7856a35..eb396c3 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+he.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+he.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "יש %@ הפעלות SMB פתוחות בשיתוף של המכונה. הפעלה מחדש עכשיו תנתק אותן באמצע עבודת Time Machine. הוצא את דיסק הגיבוי ב-Mac או המתן עד שייסגרו (smbstatus -b במכונה מציג אותן), ואז הרץ שוב את vm-update.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ לא הגיב - המכונה לא תופעל מחדש כל עוד לא ידוע אם Time Machine משתמש בשיתוף.", + "%@ band(s) not secured after an rclone restart": + "רצועות שלא אובטחו לאחר הפעלה מחדש של rclone: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine נשאר כבוי עד שהן יאובטחו: רצועה שהועלתה לפני שנקראה לאחר ההפעלה מחדש עלולה לחזור כאפסים. המכונה קוראת אותן שוב בכל דקה (cm-smb-heal). בדיקה: cloudmachine-agent vm-status, ולאחר מכן במכונה: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "הגנת הפעלה מחדש: רצועות שלא אובטחו לאחר הפעלה מחדש של rclone: %@ - Samba נשאר כבוי עד שייקראו (cm-smb-heal מנסה שוב בכל דקה)", "First backup in progress: %@": "הגיבוי הראשון בעיצומו: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "הגיבוי הראשון לא הושלם תוך %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "גם עם מגבלת 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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+it.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+it.swift index c163ce8..547b280 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+it.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+it.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Sulla condivisione della macchina ci sono %@ sessioni SMB aperte. Riavviarla ora le interromperebbe nel mezzo del lavoro di Time Machine. Espelli il disco di backup sul Mac o attendi che si chiudano (smbstatus -b nella macchina le elenca), poi esegui di nuovo vm-update.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ non ha risposto: la macchina non viene riavviata finché non si sa se Time Machine usa la condivisione.", + "%@ band(s) not secured after an rclone restart": + "%@ banda/e non messa/e in sicurezza dopo un riavvio di rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine resta spento finché non lo sono: una banda caricata prima di essere letta dopo il riavvio può tornare come zeri. La macchina le rilegge ogni minuto (cm-smb-heal). Controlla: cloudmachine-agent vm-status, poi nella macchina: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Guardia riavvio: %@ banda/e non messa/e in sicurezza dopo un riavvio di rclone - Samba resta spento finché non sono lette (cm-smb-heal riprova ogni minuto)", "First backup in progress: %@": "Prima copia in corso: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "La prima copia non è stata completata in %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "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.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+ja.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+ja.swift index cf7f239..0ab274f 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+ja.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+ja.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "マシンの共有に開いている SMB セッションが %@ 件あります。今再起動すると Time Machine の作業の途中で切断されます。Mac でバックアップディスクをイジェクトするか、セッションが閉じるまで待ってから(マシン内の smbstatus -b で一覧できます)、vm-update をもう一度実行してください。", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ から応答がありません。Time Machine が共有を使用中かどうか不明な間は、マシンを再起動しません。", + "%@ band(s) not secured after an rclone restart": + "rclone の再起動後に保護されていないバンド: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "保護されるまで Time Machine は停止したままです。再起動後に読み取られる前にアップロードされたバンドは、ゼロとして戻ることがあります。マシンは毎分読み取りを再試行します(cm-smb-heal)。確認: cloudmachine-agent vm-status、次にマシン内で: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "再起動ガード: rclone の再起動後に保護されていないバンド: %@ - 読み取られるまで Samba は停止したままです(cm-smb-heal が毎分再試行)", "First backup in progress: %@": "最初のバックアップを実行中: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "最初のバックアップが %@ 以内に完了しませんでした", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Google の 1 日 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 ドライブにあるわけではありません(アップロード待ちのファイル %@ 件、キャッシュ内の変更されたファイル %@ 件)。今マシンを再起動すると、それらがゼロとして戻る可能性があります。アップロードが終わるまで待ってから(cloudmachine-agent vm-status)、もう一度 vm-update を実行してください。", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+ko.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+ko.swift index 0290d06..0fe9fcb 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+ko.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+ko.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "머신의 공유에 열린 SMB 세션이 %@개 있습니다. 지금 재시작하면 Time Machine 작업 도중에 끊어집니다. Mac에서 백업 디스크를 추출하거나 세션이 닫힐 때까지 기다린 다음(머신 안의 smbstatus -b로 확인) vm-update를 다시 실행하세요.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ 응답이 없습니다. Time Machine이 공유를 사용 중인지 알 수 없는 동안에는 머신을 재시작하지 않습니다.", + "%@ band(s) not secured after an rclone restart": + "rclone 재시작 후 보호되지 않은 밴드: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "보호될 때까지 Time Machine은 꺼진 상태로 유지됩니다. 재시작 후 읽히기 전에 업로드된 밴드는 0으로 돌아올 수 있습니다. 머신이 매분 다시 읽습니다(cm-smb-heal). 확인: cloudmachine-agent vm-status, 그다음 머신에서: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "재시작 보호: rclone 재시작 후 보호되지 않은 밴드: %@ - 읽힐 때까지 Samba는 꺼진 상태로 유지됩니다(cm-smb-heal이 매분 재시도)", "First backup in progress: %@": "첫 번째 백업 진행 중: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "첫 번째 백업이 %@ 안에 완료되지 않았습니다", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Google의 하루 750GB 제한이 있어도 첫 번째 백업은 보통 며칠 안에 끝납니다. 확인: 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 드라이브에 있지는 않습니다(업로드 대기 중인 파일 %@개, 캐시의 변경된 파일 %@개). 지금 머신을 다시 시작하면 해당 파일이 0으로 채워져 돌아올 수 있습니다. 업로드가 끝날 때까지 기다린 후(cloudmachine-agent vm-status) vm-update를 다시 실행하세요.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+ms.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+ms.swift index c284752..27e46d1 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+ms.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+ms.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Terdapat %@ sesi SMB terbuka pada kongsian mesin. Memulakan semula sekarang akan memutuskannya di tengah kerja Time Machine. Keluarkan cakera sandaran pada Mac atau tunggu sehingga ia ditutup (smbstatus -b dalam mesin menyenaraikannya), kemudian jalankan vm-update semula.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ tidak menjawab - mesin tidak dimulakan semula selagi tidak diketahui sama ada Time Machine menggunakan kongsian.", + "%@ band(s) not secured after an rclone restart": + "%@ jalur tidak diamankan selepas rclone dimulakan semula", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine kekal dimatikan sehingga ia diamankan: jalur yang dimuat naik sebelum dibaca selepas dimulakan semula boleh kembali sebagai sifar. Mesin membacanya semula setiap minit (cm-smb-heal). Semak: cloudmachine-agent vm-status, kemudian dalam mesin: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Pengawal mula semula: %@ jalur tidak diamankan selepas rclone dimulakan semula - Samba kekal dimatikan sehingga ia dibaca (cm-smb-heal mencuba semula setiap minit)", "First backup in progress: %@": "Sandaran pertama sedang berjalan: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Sandaran pertama tidak siap dalam %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Walaupun dengan had Google 750 GB sehari, sandaran pertama biasanya siap dalam beberapa hari. Semak: tmutil status dan 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.": + "Belum semuanya berada di Google Drive (%@ fail menunggu muat naik, %@ fail berubah dalam cache). Memulakan semula mesin sekarang boleh mengembalikannya sebagai sifar. Tunggu sehingga muat naik selesai (cloudmachine-agent vm-status), kemudian jalankan vm-update semula.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+nb.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+nb.swift index c4fa2bf..c3df7be 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+nb.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+nb.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Det er %@ åpne SMB-økter på maskinens deling. Hvis maskinen startes på nytt nå, brytes de midt i Time Machines arbeid. Løs ut sikkerhetskopidisken på Mac-en, eller vent til de lukkes (smbstatus -b i maskinen viser dem), og kjør deretter vm-update på nytt.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ svarte ikke - maskinen startes ikke på nytt så lenge det er ukjent om Time Machine bruker delingen.", + "%@ band(s) not secured after an rclone restart": + "%@ bånd ikke sikret etter en omstart av rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine forblir av til de er sikret: et bånd som ble lastet opp før det ble lest etter omstarten, kan komme tilbake som nuller. Maskinen leser dem på nytt hvert minutt (cm-smb-heal). Sjekk: cloudmachine-agent vm-status, deretter i maskinen: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Omstartsvakt: %@ bånd ikke sikret etter en omstart av rclone - Samba forblir av til de er lest (cm-smb-heal prøver igjen hvert minutt)", "First backup in progress: %@": "Første sikkerhetskopi pågår: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Den første sikkerhetskopien er ikke fullført på %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Selv med Googles grense på 750 GB i døgnet blir en første sikkerhetskopi vanligvis ferdig på noen få dager. Kontroller: 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 Disk ennå (%@ fil(er) venter på opplasting, %@ endret/endrede fil(er) i hurtigbufferen). En omstart av maskinen nå kan gi dem tilbake som nuller. Vent til opplastingen er ferdig (cloudmachine-agent vm-status), og kjør deretter vm-update på nytt.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+nl.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+nl.swift index ca1df71..3f5d564 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+nl.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+nl.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Er zijn %@ open SMB-sessies op de share van de machine. Een herstart nu zou ze midden in het werk van Time Machine afbreken. Werp de back-upschijf op de Mac uit of wacht tot ze sluiten (smbstatus -b in de machine toont ze), en voer daarna vm-update opnieuw uit.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ gaf geen antwoord - de machine wordt niet herstart zolang onbekend is of Time Machine de share gebruikt.", + "%@ band(s) not secured after an rclone restart": + "%@ band(en) niet veiliggesteld na een herstart van rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine blijft uit tot ze veiliggesteld zijn: een band die vóór het lezen na de herstart is geüpload, kan als nullen terugkomen. De machine leest ze elke minuut opnieuw (cm-smb-heal). Controleer: cloudmachine-agent vm-status, daarna in de machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Herstartbewaking: %@ band(en) niet veiliggesteld na een herstart van rclone - Samba blijft uit tot ze gelezen zijn (cm-smb-heal probeert het elke minuut opnieuw)", "First backup in progress: %@": "Eerste back-up bezig: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "De eerste back-up is niet voltooid in %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Zelfs met de limiet van Google van 750 GB per dag is een eerste back-up meestal binnen enkele dagen klaar. Controleer: tmutil status en 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.": + "Nog niet alles staat op Google Drive (%@ bestand(en) wacht(en) op upload, %@ gewijzigde bestand(en) in de cache). Nu de machine herstarten kan ze als nullen teruggeven. Wacht tot de upload klaar is (cloudmachine-agent vm-status) en voer daarna vm-update opnieuw uit.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+pt-BR.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+pt-BR.swift index 32269b8..dd5fc46 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+pt-BR.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+pt-BR.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Há %@ sessões SMB abertas no compartilhamento da máquina. Reiniciar agora as interromperia no meio do trabalho do Time Machine. Ejete o disco de backup no Mac ou espere até que fechem (smbstatus -b na máquina as lista) e execute vm-update de novo.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ não respondeu - a máquina não será reiniciada enquanto não se souber se o Time Machine está usando o compartilhamento.", + "%@ band(s) not secured after an rclone restart": + "%@ banda(s) não protegida(s) após um reinício do rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "O Time Machine fica desligado até que estejam: uma banda enviada antes de ser lida após o reinício pode voltar como zeros. A máquina as lê de novo a cada minuto (cm-smb-heal). Verifique: cloudmachine-agent vm-status e, na máquina: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Guarda reinício: %@ banda(s) não protegida(s) após um reinício do rclone - o Samba fica desligado até serem lidas (cm-smb-heal tenta de novo a cada minuto)", "First backup in progress: %@": "Primeira cópia em andamento: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "A primeira cópia não foi concluída em %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Mesmo com o limite do Google de 750 GB por dia, uma primeira cópia normalmente termina em poucos dias. Verifique: 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.": + "Nem tudo está no Google Drive ainda (%@ arquivo(s) aguardando envio, %@ arquivo(s) alterado(s) no cache). Reiniciar a máquina agora pode trazê-los de volta como zeros. Aguarde o fim do envio (cloudmachine-agent vm-status) e execute vm-update novamente.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+ru.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+ru.swift index de625c9..8fa24e6 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+ru.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+ru.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "На общей папке машины открыто SMB-сессий: %@. Перезапуск сейчас оборвёт их посреди работы Time Machine. Извлеките диск резервной копии на Mac или дождитесь их закрытия (список покажет smbstatus -b в машине) и запустите vm-update снова.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ не ответил - машина не будет перезапущена, пока неизвестно, использует ли Time Machine общую папку.", + "%@ band(s) not secured after an rclone restart": + "Полос, не защищённых после перезапуска rclone: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine остаётся выключенным, пока они не защищены: полоса, отправленная до чтения после перезапуска, может вернуться нулями. Машина перечитывает их каждую минуту (cm-smb-heal). Проверьте: cloudmachine-agent vm-status, затем в машине: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Защита перезапуска: полос, не защищённых после перезапуска rclone: %@ - Samba остаётся выключенной, пока они не прочитаны (cm-smb-heal повторяет каждую минуту)", "First backup in progress: %@": "Первая резервная копия выполняется: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Первая резервная копия не завершена за %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Даже при лимите 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 Диске (файлов в очереди на отправку: %@, изменённых файлов в кэше: %@). Перезапуск машины сейчас может вернуть их заполненными нулями. Дождитесь окончания отправки (cloudmachine-agent vm-status), затем снова запустите vm-update.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+sv.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+sv.swift index fa66048..dbd0f4e 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+sv.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+sv.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Det finns %@ öppna SMB-sessioner på maskinens delning. En omstart nu skulle avbryta dem mitt i Time Machines arbete. Mata ut säkerhetskopieringsdisken på Macen eller vänta tills de stängs (smbstatus -b i maskinen listar dem), och kör sedan vm-update igen.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ svarade inte - maskinen startas inte om så länge det är okänt om Time Machine använder delningen.", + "%@ band(s) not secured after an rclone restart": + "%@ band inte säkrade efter en omstart av rclone", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine förblir avstängd tills de är säkrade: ett band som laddades upp innan det lästes efter omstarten kan komma tillbaka som nollor. Maskinen läser dem igen varje minut (cm-smb-heal). Kontrollera: cloudmachine-agent vm-status, sedan i maskinen: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Omstartsvakt: %@ band inte säkrade efter en omstart av rclone - Samba förblir avstängd tills de är lästa (cm-smb-heal försöker igen varje minut)", "First backup in progress: %@": "Första säkerhetskopian pågår: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "Den första säkerhetskopian har inte slutförts på %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Även med Googles gräns på 750 GB per dygn är en första säkerhetskopia normalt klar inom några dagar. Kontrollera: tmutil status och 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.": + "Allt finns inte på Google Drive än (%@ fil(er) väntar på uppladdning, %@ ändrad(e) fil(er) i cachen). En omstart av maskinen nu kan ge tillbaka dem som nollor. Vänta tills uppladdningen är klar (cloudmachine-agent vm-status) och kör sedan vm-update igen.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+th.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+th.swift index f4ff147..7cc6292 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+th.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+th.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "มีเซสชัน SMB ที่เปิดอยู่ %@ รายการบนการแชร์ของเครื่อง การรีสตาร์ตตอนนี้จะตัดเซสชันกลางงานของ Time Machine ให้นำดิสก์สำรองข้อมูลบน Mac ออก หรือรอจนกว่าเซสชันจะปิด (smbstatus -b ในเครื่องจะแสดงรายการ) แล้วเรียกใช้ vm-update อีกครั้ง", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ ไม่ตอบสนอง - จะไม่รีสตาร์ตเครื่องตราบใดที่ยังไม่ทราบว่า Time Machine ใช้การแชร์อยู่หรือไม่", + "%@ band(s) not secured after an rclone restart": + "แถบที่ยังไม่ได้รับการปกป้องหลังรีสตาร์ต rclone: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Time Machine จะปิดอยู่จนกว่าแถบเหล่านั้นจะได้รับการปกป้อง: แถบที่อัปโหลดก่อนถูกอ่านหลังการรีสตาร์ตอาจกลับมาเป็นศูนย์ เครื่องจะอ่านซ้ำทุกนาที (cm-smb-heal) ตรวจสอบ: cloudmachine-agent vm-status แล้วในเครื่อง: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "การป้องกันรีสตาร์ต: แถบที่ยังไม่ได้รับการปกป้องหลังรีสตาร์ต rclone: %@ - Samba จะปิดอยู่จนกว่าจะอ่านได้ (cm-smb-heal ลองใหม่ทุกนาที)", "First backup in progress: %@": "กำลังสำรองข้อมูลครั้งแรก: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "การสำรองข้อมูลครั้งแรกไม่เสร็จภายใน %@", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "แม้จะมีขีดจำกัดของ 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 ไดรฟ์ (ไฟล์ที่รออัปโหลด %@ ไฟล์, ไฟล์ที่เปลี่ยนแปลงในแคช %@ ไฟล์) การรีสตาร์ตเครื่องตอนนี้อาจทำให้ไฟล์เหล่านั้นกลับมาเป็นศูนย์ทั้งหมด รอจนกว่าการอัปโหลดจะเสร็จ (cloudmachine-agent vm-status) แล้วเรียกใช้ vm-update อีกครั้ง", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+tr.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+tr.swift index 6ddf566..df667dc 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+tr.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+tr.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "Makinenin paylaşımında %@ açık SMB oturumu var. Şimdi yeniden başlatmak, bunları Time Machine'in işinin ortasında keser. Mac'te yedek diskini çıkarın veya oturumların kapanmasını bekleyin (makinedeki smbstatus -b bunları listeler), ardından vm-update'i yeniden çalıştırın.", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ yanıt vermedi - Time Machine'in paylaşımı kullanıp kullanmadığı bilinmedikçe makine yeniden başlatılmaz.", + "%@ band(s) not secured after an rclone restart": + "rclone yeniden başlatıldıktan sonra güvenceye alınmayan bant: %@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "Güvenceye alınana kadar Time Machine kapalı kalır: yeniden başlatmadan sonra okunmadan yüklenen bir bant sıfır olarak geri gelebilir. Makine onları her dakika yeniden okur (cm-smb-heal). Kontrol: cloudmachine-agent vm-status, ardından makinede: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "Yeniden başlatma koruması: rclone yeniden başlatıldıktan sonra güvenceye alınmayan bant: %@ - okunana kadar Samba kapalı kalır (cm-smb-heal her dakika yeniden dener)", "First backup in progress: %@": "İlk yedekleme sürüyor: %@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "İlk yedekleme %@ içinde tamamlanmadı", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "Google'ın günlük 750 GB sınırında bile ilk yedekleme normalde birkaç günde tamamlanır. Kontrol edin: tmutil status ve 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.": + "Henüz her şey Google Drive'da değil (%@ dosya yüklenmeyi bekliyor, önbellekte %@ değişmiş dosya var). Makineyi şimdi yeniden başlatmak onları sıfırlarla dolu geri getirebilir. Yükleme bitene kadar bekleyin (cloudmachine-agent vm-status), sonra vm-update'i yeniden çalıştırın.", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hans.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hans.swift index 184871b..f540bd5 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hans.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hans.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "机器的共享上有 %@ 个打开的 SMB 会话。现在重启会在 Time Machine 工作中途将其中断。请在 Mac 上推出备份磁盘,或等待会话关闭(机器内的 smbstatus -b 可列出),然后再次运行 vm-update。", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ 没有响应:在不清楚 Time Machine 是否正在使用共享时,不会重启机器。", + "%@ band(s) not secured after an rclone restart": + "rclone 重启后未受保护的分段:%@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "在它们受到保护之前,Time Machine 保持关闭:重启后在读取前就已上传的分段可能会以全零返回。机器每分钟重新读取一次(cm-smb-heal)。检查:cloudmachine-agent vm-status,然后在机器中:journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "重启防护: rclone 重启后未受保护的分段:%@ - 在读取之前 Samba 保持关闭(cm-smb-heal 每分钟重试)", "First backup in progress: %@": "首次备份进行中:%@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "首次备份在 %@ 内未完成", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "即使有 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 云端硬盘(%@ 个文件等待上传,缓存中有 %@ 个已更改的文件)。现在重启机器可能使它们变成全零。请等待上传完成(cloudmachine-agent vm-status),然后再次运行 vm-update。", ] } diff --git a/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hant.swift b/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hant.swift index b404368..94bf017 100644 --- a/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hant.swift +++ b/mac-app/Sources/CloudMachineCore/L10nTranslations+zh-Hant.swift @@ -1106,6 +1106,12 @@ extension L10nTranslations { "機器的共享上有 %@ 個開啟的 SMB 連線。現在重新啟動會在 Time Machine 作業中途將其中斷。請在 Mac 上推出備份磁碟,或等待連線關閉(機器內的 smbstatus -b 可列出),然後再次執行 vm-update。", "%@ did not answer - not restarting the machine while it is unknown whether Time Machine is using the share.": "%@ 沒有回應:在不清楚 Time Machine 是否正在使用共享時,不會重新啟動機器。", + "%@ band(s) not secured after an rclone restart": + "rclone 重新啟動後未受保護的分段:%@", + "Time Machine stays off until they are: a band uploaded before it was read after the restart can come back as zeros. The machine reads them again every minute (cm-smb-heal). Check: cloudmachine-agent vm-status, then in the machine: journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard": + "在它們受到保護之前,Time Machine 保持關閉:重新啟動後在讀取前就已上傳的分段可能會以全零返回。機器每分鐘重新讀取一次(cm-smb-heal)。檢查:cloudmachine-agent vm-status,然後在機器中:journalctl -u punchfs -u cm-smb-heal | grep cm-vfs-guard", + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)": + "重新啟動防護: rclone 重新啟動後未受保護的分段:%@ - 在讀取之前 Samba 保持關閉(cm-smb-heal 每分鐘重試)", "First backup in progress: %@": "首次備份進行中:%@", "First backup in progress: starting": @@ -1128,5 +1134,7 @@ extension L10nTranslations { "首次備份在 %@ 內未完成", "Even at Google's limit of 750 GB a day a first backup normally completes within a few days. Check: tmutil status, and cloudmachine-agent vm-status": "即使有 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 雲端硬碟(%@ 個檔案等待上傳,快取中有 %@ 個已變更的檔案)。現在重新啟動機器可能使它們變成全零。請等待上傳完成(cloudmachine-agent vm-status),然後再次執行 vm-update。", ] } diff --git a/mac-app/Sources/CloudMachineCore/VMLayout.swift b/mac-app/Sources/CloudMachineCore/VMLayout.swift index 232caf0..6c0c62a 100644 --- a/mac-app/Sources/CloudMachineCore/VMLayout.swift +++ b/mac-app/Sources/CloudMachineCore/VMLayout.swift @@ -51,6 +51,13 @@ public enum VMLayout { /// must not start Samba on a half-installed image. Samba's drop-in refuses to /// start while it exists; a new attempt (`holdSmbd`) removes it. public static let smbdAttention = "/var/lib/cloudmachine/smbd-attention" + /// Bands an rclone restart left unread (`vm/cm-vfs-guard.sh`), one per line, `*` = + /// the whole rebind is owed. Samba's drop-in refuses to start while it exists; the + /// healer retries every minute. Under /run: a reboot restarts rclone and the rebind. + public static let vfsUnbound = "/run/cloudmachine/vfs-unbound" + /// A cm-vfs-guard run is reading: its start, seconds since the epoch. Apart from `*` + /// in `vfsUnbound` ("a rebind is owed"); a killed run leaves it, and it ages. + public static let vfsRebinding = "/run/cloudmachine/vfs-rebinding" public static let rcloneLog = "/var/log/rclone-tm.log" } diff --git a/mac-app/Sources/CloudMachineCore/VMStatus.swift b/mac-app/Sources/CloudMachineCore/VMStatus.swift index 4c90ebc..6e337e8 100644 --- a/mac-app/Sources/CloudMachineCore/VMStatus.swift +++ b/mac-app/Sources/CloudMachineCore/VMStatus.swift @@ -52,6 +52,13 @@ public enum VMStatus { public var backupRun: BackupRun? /// Whether the RUNNING rclone-tm deletes into Drive's bin; `nil` = not read. public var rcloneUsesBin: Bool? + /// Bands an rclone restart left unread (`VMLayout.Guest.vfsUnbound`): Samba stays off + /// until they are read. `0` = how many is not known (the rebind did not finish); + /// `nil` = none, or not read. + public var vfsUnboundBands: Int? + /// Seconds a cm-vfs-guard run has been reading (`VMLayout.Guest.vfsRebinding`); `nil` = + /// none runs, or not read. + public var vfsRebindingAge: TimeInterval? public init() {} } @@ -142,7 +149,7 @@ public enum VMStatus { private static let markerScript: String = "echo BUNDLEENV $([ -s \(VMLayout.Guest.bundleEnv) ] && echo 1 || echo 0); " - + holdScript + + holdScript + vfsUnboundScript + "echo IMAGES $(ls -d \(VMLayout.Guest.localRoot)/*.sparsebundle 2>/dev/null | wc -l); " + "echo METASYNC $(stat -c %Y \(VMLayout.Guest.metaSyncStamp) 2>/dev/null || echo 0) " + "$(date +%s); " @@ -154,6 +161,22 @@ public enum VMStatus { + "then echo SMBDHOLD $(($(date +%s) - m)); else echo SMBDHOLD -1; fi; " + "echo SMBDATTENTION $([ -e \(VMLayout.Guest.smbdAttention) ] && echo 1 || echo 0); " + /// `VFSUNBOUND `: the marker's band lines (`*` does not count), + /// -1 = no marker; how long a run has been reading, -1 = none runs. + static let vfsUnboundScript: String = + "if [ -e \(VMLayout.Guest.vfsUnbound) ]; then " + + "u=$(grep -cv '^[*]*$' \(VMLayout.Guest.vfsUnbound)); else u=-1; fi; " + + "if s=$(cat \(VMLayout.Guest.vfsRebinding) 2>/dev/null) && [ -n \"$s\" ]; " + + "then r=$(($(date +%s) - s)); else r=-1; fi; echo VFSUNBOUND $u $r; " + + /// The vm-status line for bands not secured after an rclone restart; `nil` = none. + public static func vfsUnboundLine(_ report: Report) -> String? { + guard let bands = report.vfsUnboundBands else { return nil } + return L10n.tr( + "Restart guard: %@ band(s) not secured after an rclone restart - Samba stays off until they are read (cm-smb-heal retries every minute)", + bands > 0 ? "\(bands)" : "?") + } + private static let lastUploadScript: String = "l=$(tac \(VMLayout.Guest.rcloneLog) 2>/dev/null | grep -m1 'vfs cache: upload succeeded'); " + "if [ -n \"$l\" ]; then echo LASTUPLOAD $(date -d \"$(echo \"$l\" | cut -c1-19 | tr / -)\" +%s) " @@ -204,6 +227,11 @@ public enum VMStatus { report.bundlePrepared = fields[1] == "1" } else if fields.first == "SMBDHOLD", fields.count >= 2 { report.smbdHoldAge = Int(fields[1]).flatMap { $0 >= 0 ? TimeInterval($0) : nil } + } else if fields.first == "VFSUNBOUND", fields.count >= 2, let bands = Int(fields[1]) { + report.vfsUnboundBands = bands >= 0 ? bands : nil + if fields.count >= 3, let age = Int(fields[2]), age >= 0 { + report.vfsRebindingAge = TimeInterval(age) + } } else if fields.first == "SMBDATTENTION", fields.count >= 2 { report.smbdAttention = fields[1] == "1" } else if fields.first == "IMAGES", fields.count >= 2 { @@ -435,6 +463,11 @@ public enum VMStatus { BackupHealth.formatAge(age))) healthy = false } + if let line = vfsUnboundLine(report) { + out.append(line) + // A rebind still reading within its time is how every rclone restart goes. + if !BackupHealth.rebindStillReading(report.vfsRebindingAge) { healthy = false } + } if metaSyncOverdue(report) == true { healthy = false } if let reading = report.reading { out.append( diff --git a/mac-app/Sources/CloudMachineCore/VMUpdate.swift b/mac-app/Sources/CloudMachineCore/VMUpdate.swift index 6e76765..209a250 100644 --- a/mac-app/Sources/CloudMachineCore/VMUpdate.swift +++ b/mac-app/Sources/CloudMachineCore/VMUpdate.swift @@ -258,6 +258,103 @@ public enum VMUpdate { machineRunning: running, instanceHosts: hosts) } + // MARK: - The restart + + /// The share's units. Disabled before the stop: Lima writes the template's units only + /// in cloud-final (provisioning), so boot 1 would start the OLD ones first, and an rclone + /// started with bands waiting for upload serves them as zeros (PR #80). Provisioning + /// enables and starts them again after its `daemon-reload` (cmsmb.yaml, step 6). + static let shareUnits = "rclone-tm punchfs tm-bands-bind smbd" + + /// Run in the machine right before the stop. Samba is stopped first (nothing new is + /// written), then the upload queue must be empty and no file of the running rclone's + /// cache folder dirty - as `DriveEncryption.repointScript` checks before its restart. + /// Exit 3 `CM-UNSENT `, exit 5 `CM-NO-RC`: Samba is started again. + static func quiesceScript(cacheDir: String = VMLayout.Guest.cacheDir) -> String { + let rc = "curl -fsS -m 20 -X POST http://\(VMLayout.Guest.rcAddress)" + return [ + "set -uo pipefail", + "\(VMLayout.holdSmbd) || { echo 'smbd did not stop' >&2; exit 1; }", + "back() { rm -f \(VMLayout.Guest.smbdHold); \(VMLayout.startSmbd) || true; }", + "q=$(\(rc)/vfs/queue) && v=$(\(rc)/vfs/list | tr -d '\\n' " + + "| sed -n 's/.*\"vfses\":[[:space:]]*\\[[[:space:]]*\"\\([^\"]*\\)\".*/\\1/p') " + + "&& [ -n \"$v\" ] || { back; echo CM-NO-RC; exit 5; }", + "queued=$(printf '%s' \"$q\" | grep -c '\"id\":')", + "root=${v#*:}; root=${root#/}", + "d=\(VMLayout.shellQuoted(cacheDir))/vfsMeta/\"${v%%:*}/$root\"; d=${d%/}", + "dirty=0", + "[ -d \"$d\" ] && dirty=$(grep -rl '\"Dirty\": true' \"$d\" | wc -l | tr -cd 0-9)", + "if [ \"${queued:-0}\" != 0 ] || [ \"${dirty:-0}\" != 0 ]; then", + " back; echo \"CM-UNSENT ${queued:-0} ${dirty:-0}\"; exit 3", + "fi", + "systemctl disable \(shareUnits) || { back; exit 1; }", + "echo CM-QUIESCED", + ].joined(separator: "\n") + } + + /// The stop failed: the machine runs on, as it was. + static let reenableScript = + "systemctl enable \(shareUnits); rm -f \(VMLayout.Guest.smbdHold); \(VMLayout.startSmbd)" + + /// What the restart does to the machine; fakes in the tests. + struct Machine: Sendable { + var shell: @Sendable (String) async -> ProcessResult? + var stop: @Sendable () async -> Bool + var start: @Sendable () async -> CMActionResult + } + + /// Refuses while anything waits for upload, disables the share's units, stops, replaces + /// the template and boots twice: boot 1 provisions (new units, enabled and started from + /// them), boot 2 runs them. `nil` = done; otherwise what the person is told. + static func restartOnNewTemplate( + _ machine: Machine, replaceTemplate: @Sendable () async throws -> Void, backupPath: String + ) async -> String? { + let checked = await machine.shell(quiesceScript()) + guard let checked, checked.succeeded, checked.stdout.contains("CM-QUIESCED") else { + // Cut off (no answer, another exit): the units may already be disabled. + if ![3, 5].contains(checked?.exitCode ?? -1) { _ = await machine.shell(reenableScript) } + return quiesceRefusal(checked) + } + guard await machine.stop() else { + _ = await machine.shell(reenableScript) + return L10n.tr("limactl stop failed - nothing was changed.") + } + do { + try await replaceTemplate() + } catch { + // The old template boots; its provisioning enables the units again. + _ = await machine.start() + return L10n.tr("Could not replace %@: %@", instanceYAML.path, error.localizedDescription) + } + for pass in 1...2 { + if pass == 2 { _ = await machine.stop() } + CMLogger.log("vm-update: start \(pass) of 2") + let started = await machine.start() + guard started.succeeded else { + return L10n.tr( + "%@\nThe previous template is in %@ - copy it back over lima.yaml and run limactl start %@.", + started.message, backupPath, VMLayout.instanceName) + } + } + return nil + } + + /// Exit 3 `CM-UNSENT ` is a counted answer; anything else (no rc, no + /// machine, a cut answer) leaves the queue unknown, which refuses as well. + static func quiesceRefusal(_ result: ProcessResult?) -> String { + if let result, result.exitCode == 3, + let line = result.stdout.split(separator: "\n").first(where: { $0.hasPrefix("CM-UNSENT ") }) + { + let n = line.split(separator: " ").dropFirst().map(String.init) + if n.count == 2 { + return L10n.tr( + "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.", + n[0], n[1]) + } + } + return L10n.tr("No answer from rclone in the machine - the upload queue is unknown.") + } + public static func run() async -> CMActionResult { func fail(_ message: String) -> CMActionResult { CMLogger.log("vm-update: \(message.replacingOccurrences(of: "\n", with: " "))") @@ -323,39 +420,28 @@ public enum VMUpdate { // 3b. The machine is up and has its address: ask for it again after the restarts. if !(await VMAddressLease.record()) { step("could not record the address to request") } - // 4. Replace the copy, keeping the old one next to it. - step("stopping \(VMLayout.instanceName)") - guard - (try? await VMLayout.limactl(["stop", VMLayout.instanceName], timeout: 600))?.succeeded - == true - else { return fail(L10n.tr("limactl stop failed - nothing was changed.")) } + // 4-5. Nothing waiting for upload, the share's units off, the template replaced, two boots. let stamp = DateFormatter() stamp.dateFormat = "yyyyMMdd-HHmm" let backup = instanceYAML.deletingLastPathComponent() .appendingPathComponent("lima.yaml.before-\(stamp.string(from: Date()))") - do { - try FileManager.default.copyItem(at: instanceYAML, to: backup) - try fresh.write(to: instanceYAML, atomically: true, encoding: .utf8) - } catch { - _ = await VMLayout.start() - return fail( - L10n.tr("Could not replace %@: %@", instanceYAML.path, error.localizedDescription)) - } - step("template replaced, old copy in \(backup.lastPathComponent)") - - // 5. Boot to provision, boot again to run the new units. - for pass in 1...2 { - if pass == 2 { - _ = try? await VMLayout.limactl(["stop", VMLayout.instanceName], timeout: 600) - } - step("start \(pass) of 2") - let started = await VMLayout.start() - guard started.succeeded else { - return fail( - L10n.tr( - "%@\nThe previous template is in %@ - copy it back over lima.yaml and run limactl start %@.", - started.message, backup.path, VMLayout.instanceName)) - } + let machine = Machine( + shell: { try? await VMLayout.rootShell($0, timeout: 120) }, + stop: { + CMLogger.log("vm-update: stopping \(VMLayout.instanceName)") + return (try? await VMLayout.limactl(["stop", VMLayout.instanceName], timeout: 600))? + .succeeded == true + }, + start: { await VMLayout.start() }) + if let failure = await restartOnNewTemplate( + machine, + replaceTemplate: { + try FileManager.default.copyItem(at: instanceYAML, to: backup) + try fresh.write(to: instanceYAML, atomically: true, encoding: .utf8) + CMLogger.log("vm-update: template replaced, old copy in \(backup.lastPathComponent)") + }, backupPath: backup.path) + { + return fail(failure) } // The template was replaced: the MAC is read again (the only time besides the first). diff --git a/mac-app/Tests/CloudMachineAppTests/AuditVerdictTests.swift b/mac-app/Tests/CloudMachineAppTests/AuditVerdictTests.swift index 0be481d..3e2d8b8 100644 --- a/mac-app/Tests/CloudMachineAppTests/AuditVerdictTests.swift +++ b/mac-app/Tests/CloudMachineAppTests/AuditVerdictTests.swift @@ -79,6 +79,8 @@ final class AuditVerdictTests: XCTestCase { "snapshotCount", "backupRun", "rcloneUsesBin", "snapshotOldest", "imageName", // Read by `BackupHealth.currentReport`: a full Drive is a failure at once. "uploadLimitStorageFull", + // Read by `BackupHealth.currentReport` (bands-not-secured) and `vm-status`. + "vfsUnboundBands", "vfsRebindingAge", ] let actual = Set(Mirror(reflecting: VMStatus.Report()).children.compactMap(\.label)) XCTAssertEqual(actual, known) diff --git a/mac-app/Tests/CloudMachineAppTests/BackupHealthTests.swift b/mac-app/Tests/CloudMachineAppTests/BackupHealthTests.swift index e17799e..e4d314e 100644 --- a/mac-app/Tests/CloudMachineAppTests/BackupHealthTests.swift +++ b/mac-app/Tests/CloudMachineAppTests/BackupHealthTests.swift @@ -551,6 +551,97 @@ final class BackupHealthTests: XCTestCase { XCTAssertEqual(report.problems.map(\.code), ["upload-stalled"]) } + /// Bands cm-vfs-guard could not read after an rclone restart (30.11.2026): Samba stays + /// off on purpose, and the person is told why, with the number of bands. + func testBandsNotSecuredAfterARestartAreReported() throws { + func evaluate(_ unbound: Int?) -> BackupHealth.Report { + BackupHealth.evaluate( + lastSuccess: now.addingTimeInterval(-1800), lastAttempt: now.addingTimeInterval(-1800), + result: 0, now: now, machineRunning: true, servicesHealthy: true, + destinationRegistered: true, erroredFiles: 0, outOfSpace: false, queueReadable: true, + vfsUnboundBands: unbound) + } + let report = evaluate(12) + XCTAssertEqual(report.problems.map(\.code), ["bands-not-secured"]) + let problem = try XCTUnwrap(report.problems.first) + XCTAssertTrue(problem.summary.contains("12"), problem.summary) + XCTAssertTrue(problem.detail.contains("cm-smb-heal"), problem.detail) + // 0 = the rebind did not finish (no answer from rclone): the number is not known. + XCTAssertTrue(try XCTUnwrap(evaluate(0).problems.first).summary.contains("?")) + XCTAssertEqual(evaluate(nil).problems, []) + } + + func testStatusReportCountsBandsNotSecured() { + XCTAssertEqual(VMStatus.report(scriptOutput: "VFSUNBOUND 3").vfsUnboundBands, 3) + XCTAssertEqual(VMStatus.report(scriptOutput: "VFSUNBOUND 0").vfsUnboundBands, 0) + XCTAssertNil(VMStatus.report(scriptOutput: "VFSUNBOUND -1").vfsUnboundBands) + XCTAssertNil(VMStatus.report(scriptOutput: "SVC smbd active").vfsUnboundBands) + XCTAssertTrue(VMStatus.script.contains(VMLayout.Guest.vfsUnbound)) + XCTAssertEqual(VMLayout.Guest.vfsUnbound, "/run/cloudmachine/vfs-unbound") + var report = VMStatus.Report() + XCTAssertNil(VMStatus.vfsUnboundLine(report)) + report.vfsUnboundBands = 3 + XCTAssertTrue(VMStatus.vfsUnboundLine(report)?.contains("3") == true) + } + + /// The status script's line, executed on a real marker (`*` = the whole rebind is owed). + func testStatusScriptCountsTheMarkerLines() throws { + let dir = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString) + try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true) + defer { try? FileManager.default.removeItem(at: dir) } + let marker = dir.appendingPathComponent("vfs-unbound").path + let running = dir.appendingPathComponent("vfs-rebinding").path + func run() throws -> String { + let p = Process() + p.executableURL = URL(fileURLWithPath: "/bin/sh") + p.arguments = [ + "-c", + VMStatus.vfsUnboundScript + .replacingOccurrences(of: VMLayout.Guest.vfsUnbound, with: marker) + .replacingOccurrences(of: VMLayout.Guest.vfsRebinding, with: running), + ] + let out = Pipe() + p.standardOutput = out + try p.run() + p.waitUntilExit() + return String(data: out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? "" + } + XCTAssertEqual(try run(), "VFSUNBOUND -1 -1\n") + try "bands/3\nbands/4\n".write(toFile: marker, atomically: true, encoding: .utf8) + XCTAssertEqual(try run(), "VFSUNBOUND 2 -1\n") + try "*\n".write(toFile: marker, atomically: true, encoding: .utf8) + XCTAssertEqual(try run(), "VFSUNBOUND 0 -1\n") + // A run in progress: how long it has been reading (its start, seconds since the epoch). + let since = Int(Date().timeIntervalSince1970) - 120 + try "\(since)\n".write(toFile: running, atomically: true, encoding: .utf8) + let line = try run() + let age = Int(line.split(separator: " ").last?.trimmingCharacters(in: .newlines) ?? "") ?? -1 + XCTAssertTrue(line.hasPrefix("VFSUNBOUND 0 "), line) + XCTAssertTrue((119...130).contains(age), line) + } + + /// A rebind that is still reading within its time is a note (every rclone restart runs + /// one, up to 15 min); past punchfs's start timeout it is a failure (review of 97ef814). + func testRebindInProgressIsANoteUntilItsTimeRunsOut() throws { + func evaluate(_ unbound: Int?, running: TimeInterval?) -> BackupHealth.Report { + BackupHealth.evaluate( + lastSuccess: now.addingTimeInterval(-1800), lastAttempt: now.addingTimeInterval(-1800), + result: 0, now: now, machineRunning: true, servicesHealthy: true, + destinationRegistered: true, erroredFiles: 0, outOfSpace: false, queueReadable: true, + vfsUnboundBands: unbound, vfsRebindingAge: running) + } + let reading = evaluate(0, running: 300) + XCTAssertEqual(reading.problems, []) + XCTAssertEqual(reading.notices.map(\.code), ["bands-not-secured"]) + XCTAssertEqual(evaluate(0, running: 1500).problems.map(\.code), ["bands-not-secured"]) + XCTAssertEqual(evaluate(4, running: nil).problems.map(\.code), ["bands-not-secured"]) + XCTAssertEqual( + VMStatus.report(scriptOutput: "VFSUNBOUND 0 300").vfsRebindingAge, 300) + XCTAssertNil(VMStatus.report(scriptOutput: "VFSUNBOUND 0 -1").vfsRebindingAge) + XCTAssertNil(VMStatus.report(scriptOutput: "VFSUNBOUND 2").vfsRebindingAge) + XCTAssertEqual(VMLayout.Guest.vfsRebinding, "/run/cloudmachine/vfs-rebinding") + } + func testUptimeCanBeRead() { let uptime = BackupHealth.systemUptime() XCTAssertNotNil(uptime) diff --git a/mac-app/Tests/CloudMachineAppTests/DriveEncryptionTests.swift b/mac-app/Tests/CloudMachineAppTests/DriveEncryptionTests.swift index aca2abb..9dee752 100644 --- a/mac-app/Tests/CloudMachineAppTests/DriveEncryptionTests.swift +++ b/mac-app/Tests/CloudMachineAppTests/DriveEncryptionTests.swift @@ -279,6 +279,78 @@ final class DriveEncryptionTests: XCTestCase { "/var/cache/rclone/vfs/gdrive-crypt/tm") } + /// rclone keeps the buffer of a remote with config overrides (the mount's --drive-* + /// flags) in `{hash}` (cmtest 30.11.2026: `gdrive{7LdmB}`), so the plain folder + /// alone left the old 120 GB buffer behind. Run for real: both go, nothing else does. + func testCacheRemovalTakesTheHashedFolderToo() throws { + let fm = FileManager.default + let root = fm.temporaryDirectory.appendingPathComponent("cm cache \(UUID().uuidString)") + defer { try? fm.removeItem(at: root) } + let gone = [ + "vfs/gdrive/CloudMachine/m-tm/bands/1", "vfsMeta/gdrive/CloudMachine/m-tm/bands/1", + "vfs/gdrive{7LdmB}/CloudMachine/m-tm/bands/1", + "vfsMeta/gdrive{7LdmB}/CloudMachine/m-tm/bands/1", + ] + let kept = [ + "vfs/gdrive{7LdmB}/CloudMachine/m-tm-old/bands/1", "vfs/gdrive{7LdmB}/CloudMachine/other/x", + "vfs/gdrive-crypt{x}/tm/bands/1", "vfsMeta/gdrive-crypt/tm/bands/1", + ] + for path in gone + kept { + let url = root.appendingPathComponent(path) + try fm.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true) + try Data("x".utf8).write(to: url) + } + let words = DriveEncryption.cacheRemovalWords( + remote: "gdrive:CloudMachine/m-tm", cacheDir: root.path) + let process = Process() + process.executableURL = URL(fileURLWithPath: "/bin/bash") + process.arguments = ["-c", "set -euo pipefail; rm -rf " + words.joined(separator: " ")] + try process.run() + process.waitUntilExit() + XCTAssertEqual(process.terminationStatus, 0) + for path in gone { + XCTAssertFalse(fm.fileExists(atPath: root.appendingPathComponent(path).path), path) + } + for path in kept { + XCTAssertTrue(fm.fileExists(atPath: root.appendingPathComponent(path).path), path) + } + } + + /// A remote without a subfolder: its whole buffer, both folders, and no other remote's. + func testCacheRemovalForARemoteWithoutSubfolder() throws { + let fm = FileManager.default + let root = fm.temporaryDirectory.appendingPathComponent("cm cache \(UUID().uuidString)") + defer { try? fm.removeItem(at: root) } + let gone = ["vfs/gdrive/bands/1", "vfsMeta/gdrive{7LdmB}/bands/1"] + let kept = ["vfs/gdrive-crypt{x}/tm/1", "vfsMeta/gdrive-crypt/tm/1", "vfs/gdrive2/x"] + for path in gone + kept { + let url = root.appendingPathComponent(path) + try fm.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true) + try Data("x".utf8).write(to: url) + } + let words = DriveEncryption.cacheRemovalWords(remote: "gdrive:", cacheDir: root.path) + let process = Process() + process.executableURL = URL(fileURLWithPath: "/bin/bash") + process.arguments = ["-c", "set -euo pipefail; rm -rf " + words.joined(separator: " ")] + try process.run() + process.waitUntilExit() + XCTAssertEqual(process.terminationStatus, 0) + for path in gone { + XCTAssertFalse(fm.fileExists(atPath: root.appendingPathComponent(path).path), path) + } + for path in kept { + XCTAssertTrue(fm.fileExists(atPath: root.appendingPathComponent(path).path), path) + } + } + + func testRepointRemovesTheHashedBufferToo() { + let script = DriveEncryption.repointScript( + oldRemote: "gdrive:CloudMachine/m-tm", newRemote: "gdrive-crypt:tm", stamp: "S") + XCTAssertTrue(script.contains("'/var/cache/rclone/vfs/gdrive'{*}'/CloudMachine/m-tm'"), script) + XCTAssertTrue( + script.contains("'/var/cache/rclone/vfsMeta/gdrive'{*}'/CloudMachine/m-tm'"), script) + } + /// The order is the safety: the queue is checked empty before anything /// changes, the way back is armed before the units stop, and only the old /// remote's buffer is deleted. diff --git a/mac-app/Tests/CloudMachineAppTests/TMBundleScriptTests.swift b/mac-app/Tests/CloudMachineAppTests/TMBundleScriptTests.swift index f53acfe..f76fbe9 100644 --- a/mac-app/Tests/CloudMachineAppTests/TMBundleScriptTests.swift +++ b/mac-app/Tests/CloudMachineAppTests/TMBundleScriptTests.swift @@ -135,14 +135,23 @@ final class TMBundleScriptTests: XCTestCase { // MARK: - stored_name on awkward names - /// The script as Lima embeds it into the machine (nil without limactl). + /// The script as Lima embeds it into the machine (nil without limactl). Since + /// 30.11.2026 it rides in the punchfs archive: unpacked the way provisioning does. private func useEmbeddedScript() throws { try XCTSkipIf(VMEmbedTests.limactl == nil, "limactl is not installed") let embedded = try VMEmbedTests.embedViaLima() - let text = try XCTUnwrap(embedded["/usr/local/sbin/tm-bundle"]) - let file = root.appendingPathComponent("tm-bundle-embedded.sh") - try text.write(to: file, atomically: true, encoding: .utf8) - scriptOverride = file + let archive = try XCTUnwrap(embedded["/opt/cloudmachine/punchfs/src.tar.gz.b64"]) + let packed = root.appendingPathComponent("src.tar.gz.b64") + try archive.write(to: packed, atomically: true, encoding: .utf8) + let unpack = Process() + unpack.executableURL = URL(fileURLWithPath: "/bin/sh") + unpack.arguments = [ + "-c", "base64 -D < '\(packed.path)' | tar -xz -C '\(root.path)' tm-bundle.sh", + ] + try unpack.run() + unpack.waitUntilExit() + XCTAssertEqual(unpack.terminationStatus, 0) + scriptOverride = root.appendingPathComponent("tm-bundle.sh") } /// bundle.env as systemd reads it: `\"` is a quote, `\\` a backslash. @@ -412,9 +421,12 @@ final class TMBundleScriptTests: XCTestCase { XCTAssertTrue(meta.contains("ExecCondition=/usr/local/sbin/tm-bundle has-info\n"), meta) XCTAssertFalse(meta.contains("${CM_BUNDLE}")) + // 30.11.2026: shipped inside vm/punchfs/src.tar.gz.b64 (Lima's 64 KiB limit) and + // installed from it; VFSGuardTests checks the archive holds the current script. let yaml = try Self.repoFile("vm/cmsmb.yaml") XCTAssertTrue( yaml.contains( - " path: /usr/local/sbin/tm-bundle\n file: tm-bundle.sh\n permissions: 755\n"), yaml) + "install -m 755 /opt/cloudmachine/punchfs/tm-bundle.sh /usr/local/sbin/tm-bundle\n"), yaml) + XCTAssertFalse(yaml.contains("file: tm-bundle.sh"), "embedded twice") } } diff --git a/mac-app/Tests/CloudMachineAppTests/VFSGuardTests.swift b/mac-app/Tests/CloudMachineAppTests/VFSGuardTests.swift new file mode 100644 index 0000000..65f95ff --- /dev/null +++ b/mac-app/Tests/CloudMachineAppTests/VFSGuardTests.swift @@ -0,0 +1,1187 @@ +import XCTest + +/// 30 Nov 2026, E6 on cmtest: after ANY rclone restart (kill -9, OOM, `systemctl restart`) +/// a Time Machine band that was new and still waiting for write-back came back as zeros, +/// although Drive had it intact. rclone 1.75.1 reloads such a file as a virtual directory +/// entry with no object and uploads it without telling the VFS layer; the first open after +/// the upload then says "removed cache file as stale (remote deleted)" and leaves an empty, +/// clean cache entry that reads as 0 bytes even after the next restart. +/// `vm/cm-vfs-guard.sh`: `repair` is an ExecStartPre= of rclone-tm, `rebind` an +/// ExecStartPre= of punchfs (after the mount is up, before punchfs, the bind and smbd). +final class VFSGuardTests: XCTestCase { + private static let repoRoot = URL(fileURLWithPath: #filePath) + .deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() + .deletingLastPathComponent() + + private let remote = "gdrive:CloudMachine/test-vm-tm" + /// rclone names the cache folder of a remote with config overrides `gdrive{hash}` + /// (cmtest: `gdrive{7LdmB}`). + private let remoteDir = "gdrive{7LdmB}/CloudMachine/test-vm-tm" + + // MARK: vfsMeta files, verbatim from cmtest on 30.11.2026 (`cat -vt`: ^I = tab) + + /// A band created locally and never uploaded (`_cmdebug/fixture-new`, 8 KiB, 12:21): + /// dirty, no fingerprint: Drive has no object for it. After the upload it reads as zeros. + private let neverUploaded = """ + { + \t"ModTime": "2026-11-30T12:21:53.155346852+01:00", + \t"ATime": "2026-11-30T12:21:53.15548556+01:00", + \t"Size": 8192, + \t"Rs": [ + \t\t{ + \t\t\t"Pos": 0, + \t\t\t"Size": 8192 + \t\t} + \t], + \t"Fingerprint": "", + \t"Dirty": true + } + + """ + + /// A band already on Drive and written again (`bands/59`): dirty, with the fingerprint + /// of the object on Drive. Hit too: the reload pins the OLD object to the file, the + /// upload of the new version does not replace it, and the next open says "removed cache + /// file as stale (remote is different)" and serves the OLD version from Drive (cmtest + /// 30.11.2026, band ef in cycle f2, rebind limited to files without a fingerprint). + private let rewritten = """ + { + \t"ModTime": "2026-11-30T12:06:33.322396091+01:00", + \t"ATime": "2026-11-30T12:12:15.214774362+01:00", + \t"Size": 33554432, + \t"Rs": [ + \t\t{ + \t\t\t"Pos": 0, + \t\t\t"Size": 33554432 + \t\t} + \t], + \t"Fingerprint": "33554432,2026-11-30 11:04:59.731 +0000 UTC,fd5ec7038038aeaf43ac122d0ae3a1cc", + \t"Dirty": true + } + + """ + + /// An uploaded, clean band (`bands/dc`). + private let clean = """ + { + \t"ModTime": "2026-11-30T12:05:23.147437775+01:00", + \t"ATime": "2026-11-30T12:07:06.0015442+01:00", + \t"Size": 33554432, + \t"Rs": [ + \t\t{ + \t\t\t"Pos": 0, + \t\t\t"Size": 33554432 + \t\t} + \t], + \t"Fingerprint": "33554432,2026-11-30 11:05:23.147 +0000 UTC,fadc3878e5c1698b4a89d29619071710", + \t"Dirty": false + } + + """ + + /// What the bug leaves (r1c, 11:14:05, right after "removed cache file as stale (remote + /// deleted)"; its data file had 0 bytes). + private let leftover = """ + { + \t"ModTime": "2026-11-30T11:14:05.657547647+01:00", + \t"ATime": "2026-11-30T11:14:05.657547647+01:00", + \t"Size": 0, + \t"Rs": null, + \t"Fingerprint": "", + \t"Dirty": false + } + + """ + + private let band = 33_554_432 + + private struct Entry { + var path: String + var meta: String + var dataSize: Int? // nil: no data file + var dir: String? = nil // cache folder of the remote; nil: remoteDir + } + + /// One item of rclone's upload queue (`vfs/queue`). + private struct Queued { + var id: Int + var name: String + var expiry: Double + var uploading = false + } + + /// `vfs/queue` as rclone 1.75.1 prints it (cmtest 30.11.2026, `curl -X POST .../vfs/queue`). + private func queueJSON(_ items: [Queued]) -> String { + let body = items.map { + "\t\t{\n\t\t\t\"name\": \"\($0.name)\",\n\t\t\t\"id\": \($0.id),\n" + + "\t\t\t\"size\": 33554432,\n\t\t\t\"expiry\": \($0.expiry),\n\t\t\t\"tries\": 0,\n" + + "\t\t\t\"delay\": 600,\n\t\t\t\"uploading\": \($0.uploading)\n\t\t}" + }.joined(separator: ",\n") + return "{\n\t\"queue\": [\n" + body + "\n\t]\n}\n" + } + + private struct Outcome { + var status: Int32 + var reads: [String] + var left: Set + var stderr: String + var skips: [String] + /// In order: `read ` (dd) and `expiry id=&expiry=` (rc vfs/queue-set-expiry). + var events: [String] + /// The state directory (`/run/cloudmachine`) after the run, file name -> content. + var state: [String: String] + /// stderr of the second run started during this one (`alongside`). + var alongsideStderr = "" + /// The pid in the run's lock after it ended (a killed run leaves its lock behind). + var lockPid: String? + var held: [String] { events.filter { $0.hasSuffix("&expiry=3600") } } + var restored: [String] { + events.filter { $0.hasPrefix("expiry ") && !$0.hasSuffix("&expiry=3600") } + } + } + + /// Runs the script for real on a fake cache. Fakes: `dd` (logs its input file), `timeout` + /// (not on every host), `curl` (rclone's rc: `vfs/list` answers `vfs`, default the remote + /// of the cache folder; `vfs/queue` answers `queue`; `rcDown` = no answer) and + /// `systemctl` (rclone-tm's MainPID). `state` seeds the state directory. + private func run( + _ mode: String, entries: [Entry], cacheRemoteDir: String? = nil, remote: String? = nil, + failing: Set = [], emptyReads: Set = [], deadline: String? = nil, + shell: String = "/bin/sh", + vfs: String? = nil, queue: [Queued] = [], rcDown: Bool = false, queueDown: Bool = false, + forgetDown: Bool = false, + pid: String = "4242", state: [String: String] = [:], + readSeconds: Double = 0, alongside: (mode: String, after: Double)? = nil, + killAfter: Double? = nil, stuckRead: Bool = false, readTimeout: String? = nil + ) throws -> Outcome { + let fm = FileManager.default + let dir = fm.temporaryDirectory.appendingPathComponent(UUID().uuidString) + try fm.createDirectory(at: dir, withIntermediateDirectories: true) + defer { try? fm.removeItem(at: dir) } + let cache = dir.appendingPathComponent("cache").path + let stateDir = dir.appendingPathComponent("state") + try fm.createDirectory(at: stateDir, withIntermediateDirectories: true) + for (name, body) in state { + let url = stateDir.appendingPathComponent(name) + try fm.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true) + try body.write(to: url, atomically: true, encoding: .utf8) + } + for e in entries { + let rdir = e.dir ?? cacheRemoteDir ?? remoteDir + let m = URL(fileURLWithPath: "\(cache)/vfsMeta/\(rdir)/\(e.path)") + try fm.createDirectory(at: m.deletingLastPathComponent(), withIntermediateDirectories: true) + try e.meta.write(to: m, atomically: true, encoding: .utf8) + if let n = e.dataSize { + let d = URL(fileURLWithPath: "\(cache)/vfs/\(rdir)/\(e.path)") + try fm.createDirectory(at: d.deletingLastPathComponent(), withIntermediateDirectories: true) + try Data(count: n).write(to: d) + } + } + func write(_ name: String, _ body: String) throws { + let url = dir.appendingPathComponent(name) + try ("#!/bin/sh\n" + body + "\n").write(to: url, atomically: true, encoding: .utf8) + try fm.setAttributes([.posixPermissions: 0o755], ofItemAtPath: url.path) + } + let log = dir.appendingPathComponent("reads").path + let skipLog = dir.appendingPathComponent("skips").path + let events = dir.appendingPathComponent("events").path + var fails = "" + for f in failing { fails += "[ \"$i\" = '\(f)' ] && exit 1\n" } + // A read that ends well with no byte: what an empty cache entry after "stale" gives. + var empty = "" + for f in emptyReads { empty += "[ \"$i\" = '\(f)' ] && exit 0\n" } + // stuckRead: a read hung in FUSE that ignores SIGTERM, only SIGKILL ends it; the real + // `timeout` (coreutils, /usr/bin on macOS too) runs it. + try write( + "dd", + (stuckRead ? "trap '' TERM; while :; do sleep 1; done\n" : "") + + (readSeconds > 0 ? "sleep \(readSeconds)\n" : "") + + "for a; do case \"$a\" in if=*) i=\"${a#if=}\";; skip=*) echo \"${a#skip=}\" >> '\(skipLog)';; esac; done\n" + + fails + "echo \"$i\" >> '\(log)'\n" + + "[ -s \"$CM_VFS_DROP_CACHES\" ] && echo \"dropped $(cat \"$CM_VFS_DROP_CACHES\")\" >> '\(events)'\n" + + "echo \"read $i\" >> '\(events)'\n" + empty + + "printf x") + // Logs its options, then runs the command (the first argument that is not an option or + // a duration). + if !stuckRead { + try write( + "timeout", + "while [ $# -gt 0 ]; do case \"$1\" in -*|[0-9]*) echo \"$1\" >> '\(dir.path)/timeout-args'; shift;; *) break;; esac; done\nexec \"$@\"" + ) + } + let rdir = cacheRemoteDir ?? remoteDir + let name = rdir.split(separator: "/", maxSplits: 1).map(String.init) + let vfsName = vfs ?? name[0] + ":" + (name.count > 1 ? name[1] : "") + try "{\n\t\"vfses\": [\n\t\t\"\(vfsName)\"\n\t]\n}\n".write( + to: dir.appendingPathComponent("vfs-list.json"), atomically: true, encoding: .utf8) + try queueJSON(queue).write( + to: dir.appendingPathComponent("vfs-queue.json"), atomically: true, encoding: .utf8) + // Logs the arguments that are not curl's usual ones nor the URL. + let forget = + forgetDown + ? "exit 22" + : "f=; for a; do case \"$a\" in -X|POST|-fsS|-m|[0-9]*|\"$u\") ;; *) f=\"$f $a\";; esac; done; " + + "echo \"forget${f}\" >> '\(events)'; echo '{}'" + try write( + "curl", + (rcDown ? "exit 7\n" : "") + + "for a; do u=\"$a\"; done\ncase \"$u\" in\n" + + " */vfs/list) cat '\(dir.path)/vfs-list.json';;\n" + + " */vfs/queue) \(queueDown ? "exit 22" : "cat '\(dir.path)/vfs-queue.json'");;\n" + + " */vfs/queue-set-expiry\\?*) echo \"expiry ${u#*\\?}\" >> '\(events)'; echo '{}';;\n" + + " */vfs/forget) " + forget + ";;\n" + + " */vfs/refresh) " + forget.replacingOccurrences(of: "forget", with: "refresh") + ";;\n" + + " *) exit 22;;\nesac") + try write( + "systemctl", + "[ \"$*\" = 'show -p MainPID --value rclone-tm' ] && echo '\(pid)'; exit 0") + func start(_ mode: String) throws -> (Process, Pipe) { + let p = Process() + p.executableURL = URL(fileURLWithPath: shell) + p.arguments = [Self.repoRoot.appendingPathComponent("vm/cm-vfs-guard.sh").path, mode] + p.environment = [ + "PATH": dir.path + ":/usr/bin:/bin", "CM_REMOTE": remote ?? self.remote, + "CM_VFS_CACHE": cache, "CM_VFS_MOUNT": "/srv/tm", "CM_VFS_STATE": stateDir.path, + "CM_VFS_DROP_CACHES": dir.appendingPathComponent("drop_caches").path, + ] + if let deadline { p.environment?["CM_VFS_DEADLINE"] = deadline } + if let readTimeout { p.environment?["CM_VFS_READ_TIMEOUT"] = readTimeout } + let err = Pipe() + p.standardError = err + try p.run() + return (p, err) + } + let (p, err) = try start(mode) + var alongsideStderr = "" + if let alongside { + Thread.sleep(forTimeInterval: alongside.after) + let (q, qerr) = try start(alongside.mode) + q.waitUntilExit() + alongsideStderr = + String(data: qerr.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? "" + } + if let killAfter { + Thread.sleep(forTimeInterval: killAfter) + kill(p.processIdentifier, SIGKILL) + } + p.waitUntilExit() + // A killed run's children (the fake dd) may keep the pipe open: do not wait for them. + let stderr = + killAfter != nil + ? "" : String(data: err.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? "" + func lines(_ path: String) -> [String] { + ((try? String(contentsOfFile: path, encoding: .utf8)) ?? "") + .split(separator: "\n").map(String.init) + } + var left = Set() + if let en = fm.enumerator(atPath: cache) { + for case let f as String in en { + var isDir: ObjCBool = false + if fm.fileExists(atPath: "\(cache)/\(f)", isDirectory: &isDir), !isDir.boolValue { + left.insert(f) + } + } + } + var after: [String: String] = [:] + for f in (try? fm.contentsOfDirectory(atPath: stateDir.path)) ?? [] { + after[f] = try? String(contentsOf: stateDir.appendingPathComponent(f), encoding: .utf8) + } + return Outcome( + status: p.terminationStatus, reads: lines(log), left: left, stderr: stderr, + skips: lines(skipLog), events: lines(events), state: after, + alongsideStderr: alongsideStderr, + lockPid: try? String( + contentsOf: stateDir.appendingPathComponent("vfs-lock/pid"), encoding: .utf8)) + } + + // MARK: rebind (punchfs ExecStartPre: the mount is up, punchfs and smbd are not) + + /// The fix: one read through the mount opens and closes the file in the VFS, which + /// hands the write-back the VFS layer's store function (log: "writeback object to VFS + /// layer"). Measured on cmtest: without it the band reads 0 bytes after the upload. + /// Every dirty file, with or without a fingerprint (see `rewritten`): limited to files + /// without one, cycle f2 on cmtest served the previous version of a rewritten band + /// ("stale (remote is different)": 0 in 8 cycles reading all dirty files, 29 in 2 cycles + /// reading only those without a fingerprint). Clean files are not read. + func testRebindReadsEveryDirtyFileThroughTheMount() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/30", meta: rewritten, dataSize: band), + Entry(path: "bands/31", meta: clean, dataSize: band), + Entry(path: "bands/32", meta: leftover, dataSize: 0), + ]) + XCTAssertEqual(r.status, 0) + XCTAssertEqual(Set(r.reads), ["/srv/tm/bands/3", "/srv/tm/bands/30"]) + XCTAssertFalse(r.events.contains { $0.hasPrefix("dropped") }, "only for a forgotten file") + } + + /// Image names have spaces and a typographic apostrophe; the canaries live in a subfolder. + func testRebindKeepsAwkwardPathsIntact() throws { + let p = "Managed’s Virtual Machine.sparsebundle/bands/2f" + let r = try run( + "rebind", + entries: [ + Entry(path: p, meta: neverUploaded, dataSize: 8192), + Entry(path: "_cmtest/105020/f1", meta: neverUploaded, dataSize: 8192), + ]) + XCTAssertEqual(r.status, 0) + XCTAssertEqual(Set(r.reads), ["/srv/tm/\(p)", "/srv/tm/_cmtest/105020/f1"]) + } + + /// The plain folder name (no config override) is the same remote. + func testRebindFindsTheCacheWithoutConfigHash() throws { + let r = try run( + "rebind", + entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + cacheRemoteDir: "gdrive/CloudMachine/test-vm-tm") + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + } + + /// Two folders of the same remote (the config overrides, hence the hash, changed): only + /// the one the running rclone uses (rc `vfs/list`) is read. The old one is not in this + /// rclone's VFS: a read of its path goes to the other folder's file or to Drive. + func testRebindReadsOnlyTheCacheFolderOfTheRunningRclone() throws { + let r = try run( + "rebind", + entries: [ + Entry( + path: "bands/3", meta: neverUploaded, dataSize: 8192, + dir: "gdrive/CloudMachine/test-vm-tm"), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192, dir: remoteDir), + ], vfs: "gdrive{7LdmB}:CloudMachine/test-vm-tm") + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + XCTAssertTrue(r.stderr.contains("rebound 1 dirty file"), r.stderr) + } + + /// Another machine's cache on the same disk (a different folder) is not ours. + func testRebindIgnoresOtherRemotes() throws { + let r = try run( + "rebind", + entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + cacheRemoteDir: "gdrive{7LdmB}/CloudMachine/test-vm-tm-meta", + vfs: "gdrive{7LdmB}:CloudMachine/test-vm-tm") + XCTAssertEqual(r.reads, []) + } + + // MARK: the write-back must wait for the reads (coordinator's decision 1, 30.11.2026) + + /// `--vfs-write-back 600s` counts from the reload, before the mount is up, and the reads + /// may take up to the deadline (900 s): a band uploaded before its read is the bug again. + /// So every queued upload of a file to read is pushed back (rc vfs/queue-set-expiry) BEFORE + /// the first read, and given back its own time after the reads. + func testRebindHoldsTheUploadsUntilItHasRead() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/30", meta: rewritten, dataSize: band), + Entry(path: "bands/31", meta: clean, dataSize: band), + ], + queue: [ + Queued(id: 7, name: "bands/3", expiry: 210.9), + Queued(id: 8, name: "bands/30", expiry: 590.2), + Queued(id: 9, name: "_other/x", expiry: 100), + ]) + XCTAssertEqual(Set(r.held), ["expiry id=7&expiry=3600", "expiry id=8&expiry=3600"]) + let firstRead = try XCTUnwrap(r.events.firstIndex { $0.hasPrefix("read ") }, "\(r.events)") + let lastRead = try XCTUnwrap(r.events.lastIndex { $0.hasPrefix("read ") }) + let holds = r.events.indices.filter { r.events[$0].hasSuffix("&expiry=3600") } + XCTAssertTrue(holds.allSatisfy { $0 < firstRead }, "\(r.events)") + // Back to their own time (minus the seconds the run took), after the last read. + XCTAssertEqual(r.restored.count, 2, "\(r.events)") + for (id, expiry) in [(7, 210), (8, 590)] { + let e = try XCTUnwrap(r.restored.first { $0.hasPrefix("expiry id=\(id)&expiry=") }) + let value = try XCTUnwrap(Int(e.split(separator: "=").last!)) + XCTAssertTrue((expiry - 5...expiry).contains(value), e) + XCTAssertGreaterThan(try XCTUnwrap(r.events.firstIndex(of: e)), lastRead) + } + XCTAssertNil(r.state["vfs-held"], "nothing held is left") + } + + /// An upload that already started cannot be held, and it runs with the store function + /// of the reload (none): a read during it does not bind the file, so the band is NOT + /// secured (review of e54c070). It stays in the marker (Samba off) and is remembered for a + /// `vfs/forget` once the upload has ended; it is not read now. + func testUploadAlreadyRunningIsNotCountedAsSecured() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], + queue: [ + Queued(id: 7, name: "bands/3", expiry: -3, uploading: true), + Queued(id: 8, name: "bands/4", expiry: 200), + ]) + XCTAssertEqual(r.held, ["expiry id=8&expiry=3600"]) + XCTAssertTrue(r.stderr.contains("1 already uploading"), r.stderr) + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + XCTAssertEqual(r.state["vfs-forget"], "bands/3\n") + XCTAssertTrue(r.stderr.contains("rebound 1 dirty file(s)"), r.stderr) + XCTAssertTrue(r.stderr.contains("1 left unread"), r.stderr) + XCTAssertFalse(r.events.contains { $0.hasPrefix("forget") }, "\(r.events)") + } + + /// Killed after it saw the running upload: the file is already on the forget list, so the + /// next run (a whole rebind, `*`) looks it up anew instead of opening the old node. + func testRunKilledAfterSeeingAnUploadKeepsItToForget() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], + queue: [Queued(id: 7, name: "bands/3", expiry: -3, uploading: true)], + readSeconds: 3, killAfter: 1.5) + XCTAssertEqual(r.state["vfs-forget"], "bands/3\n") + XCTAssertEqual(r.state["vfs-unbound"], "*\n") + } + + /// The retry after that upload ended (the band is no longer in the queue): the VFS still + /// has the reload's entry without an object. Before its first open the file is forgotten + /// (rc `vfs/forget`, the name form-encoded), its folder listed again (`vfs/refresh`), and + /// the kernel's dentries dropped: cmtest 30.11.2026 (up-u2), forget alone left the open on + /// the kernel's cached inode, i.e. on the node without an object: "stale", 0 bytes. + func testRetryForgetsAFinishedUploadBeforeReadingIt() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n", "vfs-forget": "bands/3\n", + ]) + let forget = try XCTUnwrap( + r.events.firstIndex(of: "forget --data-urlencode file=bands/3"), "\(r.events)") + let refresh = try XCTUnwrap( + r.events.firstIndex(of: "refresh --data-urlencode dir=bands"), "\(r.events)") + let read = try XCTUnwrap(r.events.firstIndex(of: "read /srv/tm/bands/3"), "\(r.events)") + XCTAssertLessThan(forget, refresh) + XCTAssertLessThan(refresh, read) + XCTAssertEqual(r.events[read - 1], "dropped 2", "dentries dropped before the read") + XCTAssertNil(r.state["vfs-unbound"]) + XCTAssertNil(r.state["vfs-forget"]) + } + + /// Still uploading on the retry: neither forgotten nor read, it stays in both lists. + func testRetryWaitsWhileTheUploadRuns() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + queue: [Queued(id: 7, name: "bands/3", expiry: -60, uploading: true)], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n", "vfs-forget": "bands/3\n", + ]) + XCTAssertEqual(r.reads, []) + XCTAssertFalse(r.events.contains { $0.hasPrefix("forget") }, "\(r.events)") + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + XCTAssertEqual(r.state["vfs-forget"], "bands/3\n") + } + + /// The upload failed and is queued again (not uploading): an ordinary held read binds it + /// (the close hands the queued upload the store function); no forget of a dirty file. + func testRequeuedUploadIsReadWithoutForget() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + queue: [Queued(id: 7, name: "bands/3", expiry: 30)], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n", "vfs-forget": "bands/3\n", + ]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertEqual(r.held, ["expiry id=7&expiry=3600"]) + XCTAssertFalse(r.events.contains { $0.hasPrefix("forget") }, "\(r.events)") + XCTAssertNil(r.state["vfs-unbound"]) + XCTAssertNil(r.state["vfs-forget"]) + } + + /// No queue (rc error): whether that upload ended is unknown, so it is not read. + func testRetryWithoutTheQueueDoesNotTouchAnUploadingBand() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + queueDown: true, + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n", "vfs-forget": "bands/3\n", + ]) + XCTAssertEqual(r.reads, []) + XCTAssertFalse(r.events.contains { $0.hasPrefix("forget") }, "\(r.events)") + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + } + + /// A forget that rclone refuses binds nothing: the band is not read and stays. + func testFailedForgetLeavesTheBandUnread() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + forgetDown: true, + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n", "vfs-forget": "bands/3\n", + ]) + XCTAssertEqual(r.reads, []) + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + XCTAssertEqual(r.state["vfs-forget"], "bands/3\n") + } + + /// A new rclone reloads the cache: the forget list of the previous one is dropped. + func testNewRcloneDropsTheForgetList() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + pid: "5000", + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/9\n", "vfs-forget": "bands/9\n", + ]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertFalse(r.events.contains { $0.hasPrefix("forget") }, "\(r.events)") + XCTAssertNil(r.state["vfs-forget"]) + } + + // MARK: a read must return its byte (review of e54c070) + + /// `dd` exits 0 on an empty entry left by "stale": it reads 0 bytes. That is not a bound + /// file; it stays in the marker. + func testEmptyReadIsNotRebound() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + emptyReads: ["/srv/tm/bands/3"]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertTrue(r.stderr.contains("bands/3: read failed"), r.stderr) + XCTAssertTrue(r.stderr.contains("rebound 0 dirty file(s)"), r.stderr) + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + } + + /// After a "stale" the meta says `"Size": 0` as well (clean, no fingerprint, no ranges): + /// that is the bug's empty entry, not an empty file. A retry must not take its 0 bytes + /// for a read (review of 428d613). + func testEmptyEntryLeftByStaleIsNotAnEmptyFile() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/3", meta: leftover, dataSize: 0)], + emptyReads: ["/srv/tm/bands/3"], + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/3\n"]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertEqual(r.state["vfs-unbound"], "bands/3\n") + XCTAssertTrue(r.stderr.contains("bands/3: read failed"), r.stderr) + } + + /// A file that is empty for real (`"Size": 0` in its meta) has no byte to read. + func testEmptyFileNeedsNoByte() throws { + let meta = neverUploaded.replacingOccurrences( + of: "\t\"Size\": 8192,\n\t\"Rs\": [\n\t\t{\n\t\t\t\"Pos\": 0,\n" + + "\t\t\t\"Size\": 8192\n\t\t}\n\t],", + with: "\t\"Size\": 0,\n\t\"Rs\": null,") + XCTAssertNotEqual(meta, neverUploaded) + let r = try run( + "rebind", entries: [Entry(path: "_cmtest/empty", meta: meta, dataSize: 0)], + emptyReads: ["/srv/tm/_cmtest/empty"]) + XCTAssertTrue(r.stderr.contains("rebound 1 dirty file(s)"), r.stderr) + XCTAssertNil(r.state["vfs-unbound"]) + } + + // MARK: bands left unread keep Time Machine out (decision 2) + + /// Past the deadline (or a failed read) a band stays unread: its upload stays held, and + /// the marker that keeps smbd from starting names it. cm-smb-heal retries. + func testUnreadBandsStayHeldAndKeepSambaOff() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], + deadline: "0", + queue: [ + Queued(id: 7, name: "bands/3", expiry: 200), Queued(id: 8, name: "bands/4", expiry: 300), + ]) + XCTAssertEqual(r.reads, []) + XCTAssertEqual(Set(r.held), ["expiry id=7&expiry=3600", "expiry id=8&expiry=3600"]) + XCTAssertEqual(r.restored, []) + XCTAssertEqual( + Set(r.state["vfs-unbound"]?.split(separator: "\n") ?? []), ["bands/3", "bands/4"]) + XCTAssertEqual(r.state["vfs-held"]?.split(separator: "\n").count, 2) + XCTAssertTrue(r.stderr.contains("Samba stays off"), r.stderr) + } + + /// All read: no marker, Samba may start. + func testAllReadLeavesNoMarker() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + state: ["vfs-unbound": "bands/9\n"]) + XCTAssertNil(r.state["vfs-unbound"]) + } + + /// The retry (cm-smb-heal, every minute) reads only what is left, holds it again, and + /// gives each band it reads its original time back. + func testRetryReadsOnlyWhatIsLeft() throws { + let due = Int(Date().timeIntervalSince1970) + 120 + let held = "8\t\(due)\tbands/4\n9\t\(due)\tbands/5\n" + let r = try run( + "retry", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/5", meta: neverUploaded, dataSize: 8192), + ], failing: ["/srv/tm/bands/5"], + queue: [ + Queued(id: 7, name: "bands/3", expiry: 100), Queued(id: 8, name: "bands/4", expiry: 3500), + Queued(id: 9, name: "bands/5", expiry: 3500), + ], + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\nbands/5\n", "vfs-held": held]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + XCTAssertEqual(Set(r.held), ["expiry id=8&expiry=3600", "expiry id=9&expiry=3600"]) + let back = try XCTUnwrap(r.restored.first, "\(r.events)") + XCTAssertTrue(back.hasPrefix("expiry id=8&expiry="), back) + XCTAssertTrue((115...120).contains(Int(back.split(separator: "=").last!) ?? 0), back) + XCTAssertEqual(r.restored.count, 1) + XCTAssertEqual(r.state["vfs-unbound"], "bands/5\n") + XCTAssertEqual(r.state["vfs-held"], "9\t\(due)\tbands/5\n") + } + + /// A file of the list that is gone from the cache (deleted) has nothing left to protect: + /// dropped, or it would keep Samba off for good. + func testRetryDropsAFileGoneFromTheCache() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192)], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n_cmtest/gone\n", + "vfs-forget": "_cmtest/gone\n", + ]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + XCTAssertNil(r.state["vfs-unbound"]) + XCTAssertNil(r.state["vfs-forget"]) + XCTAssertTrue(r.stderr.contains("_cmtest/gone: gone from the cache"), r.stderr) + } + + /// No cache folder at all (a wrong path, an unmounted disk): nothing is "gone", the list + /// stays and Samba stays off. + func testMissingCacheFolderDropsNothing() throws { + let r = try run( + "retry", entries: [], failing: ["/srv/tm/bands/4"], + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n"]) + XCTAssertEqual(r.state["vfs-unbound"], "bands/4\n") + XCTAssertFalse(r.stderr.contains("gone from the cache"), r.stderr) + } + + /// The last band read on a retry lifts the marker; heal then starts Samba. + func testRetryThatReadsEverythingLiftsTheMarker() throws { + let r = try run( + "retry", entries: [Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192)], + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n"]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + XCTAssertNil(r.state["vfs-unbound"]) + } + + /// rclone restarted since (another pid) and punchfs did not (the healer runs only with + /// punchfs active): nobody else will rebind this rclone, so the retry rebinds everything. + func testRetryAfterAnRcloneRestartWithoutPunchfsRebindsEverything() throws { + let r = try run( + "retry", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], pid: "5000", state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n"]) + XCTAssertEqual(Set(r.reads), ["/srv/tm/bands/3", "/srv/tm/bands/4"]) + XCTAssertEqual(r.state["vfs-rebound-pid"], "5000\n") + XCTAssertNil(r.state["vfs-unbound"]) + } + + /// One run at a time (review 30.11.2026): a retry next to a running rebind would share its + /// lists and could lift the marker with bands unread. A retry leaves a live run alone... + func testRetryLeavesARunningRunAlone() throws { + let me = ProcessInfo.processInfo.processIdentifier + let r = try run( + "retry", entries: [Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192)], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n", "vfs-lock/pid": "\(me)\n", + ]) + XCTAssertEqual(r.reads, []) + XCTAssertEqual(r.state["vfs-unbound"], "bands/4\n") + XCTAssertTrue(r.stderr.contains("another run"), r.stderr) + } + + /// ...and the lock of a killed run (no such process) does not block anything. + func testLockOfAKilledRunIsTakenOver() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + state: ["vfs-lock/pid": "999999\n"]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertNil(r.state["vfs-lock"], "released at the end") + } + + /// A run killed mid-way leaves its list behind; the next rebind must not read it again + /// (a band that is gone would keep Samba off for good). + func testListOfAKilledRunIsNotReused() throws { + let r = try run( + "rebind", entries: [], + state: ["vfs-todo": "bands/gone\n", "vfs-unbound": "*\n", "vfs-rebound-pid": "1\n"]) + XCTAssertEqual(r.reads, []) + XCTAssertNil(r.state["vfs-unbound"]) + } + + /// No queue (rc error) on a retry: the saved times of what is held stay as they were; + /// otherwise the next retry would take the 3600 s hold for the upload's own time. + func testUnreadableQueueKeepsTheSavedTimes() throws { + let held = "8\t1700000000\tbands/4\n" + let r = try run( + "retry", entries: [Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192)], + failing: ["/srv/tm/bands/4"], queueDown: true, + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n", "vfs-held": held]) + XCTAssertEqual(r.state["vfs-held"], held) + XCTAssertEqual(r.held, []) + } + + /// rclone's JSON escapes `&`, `<`, `>` (Go) and `"`, `\\`: such a name is still held. + func testEscapedNamesAreHeld() throws { + let r = try run( + "rebind", + entries: [ + Entry( + path: "Tom & Ann \"Mac\" <1>.sparsebundle/bands/1", meta: neverUploaded, + dataSize: 8192) + ], + queue: [ + Queued( + id: 7, name: "Tom \\u0026 Ann \\\"Mac\\\" \\u003c1\\u003e.sparsebundle/bands/1", + expiry: 100) + ]) + XCTAssertEqual(r.held, ["expiry id=7&expiry=3600"], r.stderr) + } + + /// No answer from rclone's rc: neither the folder nor the queue is known, so nothing is + /// proven safe. Samba stays off (`*` = everything) and the retry does a whole rebind. + func testNoAnswerFromRcloneKeepsSambaOff() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + rcDown: true) + XCTAssertEqual(r.reads, []) + XCTAssertEqual(r.state["vfs-unbound"], "*\n") + XCTAssertTrue(r.stderr.contains("no answer from rclone"), r.stderr) + let retry = try run( + "retry", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "*\n"]) + XCTAssertEqual(retry.reads, ["/srv/tm/bands/3"]) + XCTAssertNil(retry.state["vfs-unbound"]) + } + + /// Two runs at once, for real (review of 97ef814): the healer's retry starts while + /// punchfs's rebind reads. The retry must leave it alone, and the rebind must end with + /// its own, complete result: no marker lifted early, every hold given back once. + func testRetryDuringARebindLeavesItAlone() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], failing: ["/srv/tm/bands/4"], + queue: [ + Queued(id: 7, name: "bands/3", expiry: 200), Queued(id: 8, name: "bands/4", expiry: 300), + ], + readSeconds: 1, alongside: ("retry", 0.5)) + XCTAssertTrue(r.alongsideStderr.contains("another run"), r.alongsideStderr) + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + XCTAssertEqual(r.state["vfs-unbound"], "bands/4\n", "the rebind's own list") + XCTAssertEqual(r.restored.count, 1, "\(r.events)") + XCTAssertEqual(r.state["vfs-held"]?.split(separator: "\n").count, 1) + XCTAssertNil(r.state["vfs-rebinding"], "cleared at the end") + } + + /// While a run reads, `vfs-rebinding` holds its start (seconds since the epoch): the + /// status tells "a rebind is running" (a note) from "a rebind is owed" (a failure). + func testRunningRebindIsMarkedAsRunning() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + readSeconds: 3, killAfter: 1.5) + let since = try XCTUnwrap( + r.state["vfs-rebinding"].flatMap { Int($0.trimmingCharacters(in: .whitespacesAndNewlines)) }) + XCTAssertLessThan(abs(Int(Date().timeIntervalSince1970) - since), 30) + } + + /// Killed mid-run (SIGKILL, punchfs's start timeout): Samba stays off (`*`), and the next + /// run takes over the dead run's lock, rebinds everything and lifts the marker. + func testRunKilledMidwayKeepsSambaOffUntilTheNextRun() throws { + let entries = [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ] + let killed = try run( + "rebind", entries: entries, queue: [Queued(id: 7, name: "bands/3", expiry: 200)], + readSeconds: 3, killAfter: 1.5) + XCTAssertEqual(killed.state["vfs-unbound"], "*\n") + let dead = try XCTUnwrap(killed.lockPid, "a killed run cannot clean up its lock") + var left = killed.state.compactMapValues { $0 } + left["vfs-lock/pid"] = dead + let next = try run("retry", entries: entries, state: left) + XCTAssertEqual(Set(next.reads), ["/srv/tm/bands/3", "/srv/tm/bands/4"]) + XCTAssertNil(next.state["vfs-unbound"]) + XCTAssertNil(next.state["vfs-rebinding"]) + } + + // MARK: a restart of punchfs alone (decision 5) + + /// `systemctl restart punchfs` (vm-prepare-bundle) with the same rclone: its VFS has + /// already been rebound, nothing is read again. + func testPunchfsRestartWithTheSameRcloneDoesNotRebindAgain() throws { + let entries = [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)] + let same = try run("rebind", entries: entries, state: ["vfs-rebound-pid": "4242\n"]) + XCTAssertEqual(same.reads, []) + XCTAssertTrue(same.stderr.contains("not restarted"), same.stderr) + let restarted = try run( + "rebind", entries: entries, pid: "5000", state: ["vfs-rebound-pid": "4242\n"]) + XCTAssertEqual(restarted.reads, ["/srv/tm/bands/3"]) + XCTAssertEqual(restarted.state["vfs-rebound-pid"], "5000\n") + } + + /// Same rclone, but bands left unread: the restart of punchfs retries them. + func testPunchfsRestartWithBandsLeftRetriesThem() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], state: ["vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\n"]) + XCTAssertEqual(r.reads, ["/srv/tm/bands/4"]) + } + + /// No cache yet (first start) or nothing dirty: nothing to do, and never a failure. + func testRebindWithNoCacheIsHarmless() throws { + let r = try run("rebind", entries: []) + XCTAssertEqual(r.status, 0) + XCTAssertEqual(r.reads, []) + } + + func testRebindSaysHowManyFilesItRebound() throws { + let r = try run( + "rebind", entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)]) + XCTAssertTrue(r.stderr.contains("rebound 1 dirty file"), r.stderr) + XCTAssertTrue(r.stderr.contains("0 left unread"), r.stderr) + } + + /// "gdrive:" (no subfolder) must not turn into "gdrive{x}/" and break the relative paths. + func testRebindWorksForARemoteWithoutSubfolder() throws { + let r = try run( + "rebind", + entries: [Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192)], + cacheRemoteDir: "gdrive{7LdmB}", remote: "gdrive:") + XCTAssertEqual(r.reads, ["/srv/tm/bands/3"]) + } + + /// The byte comes from the first cached range, so the read never downloads from Drive. + func testRebindReadsInsideTheCachedRange() throws { + let meta = neverUploaded.replacingOccurrences(of: "\"Pos\": 0,", with: "\"Pos\": 4096,") + XCTAssertNotEqual(meta, neverUploaded) + let r = try run("rebind", entries: [Entry(path: "bands/3", meta: meta, dataSize: 8192)]) + XCTAssertEqual(r.skips, ["4096"]) + } + + /// A failed read is reported, not counted as rebound, and counted in the summary. + func testFailedReadIsNotCounted() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], failing: ["/srv/tm/bands/4"]) + XCTAssertEqual(r.status, 0) + XCTAssertTrue(r.stderr.contains("rebound 1 dirty file"), r.stderr) + XCTAssertTrue(r.stderr.contains("bands/4: read failed"), r.stderr) + XCTAssertTrue(r.stderr.contains("1 left unread"), r.stderr) + } + + /// A hung or slow mount must not hold punchfs past its TimeoutStartSec: past the + /// deadline nothing more is read; it names each file left and sums them up in one line. + /// A read stuck in FUSE may ignore SIGTERM: without -k, `timeout` waits for it forever, + /// systemd kills the start after TimeoutStartSec and Restart=always repeats it. + func testStuckReadIsKilled() throws { + let started = Date() + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], stuckRead: true, readTimeout: "1") + // Two stuck reads, each 1 s + the 5 s of -k: far below an endless read. + XCTAssertLessThan(Date().timeIntervalSince(started), 25) + XCTAssertTrue(r.stderr.contains("bands/3: read failed"), r.stderr) + XCTAssertEqual( + Set(r.state["vfs-unbound"]?.split(separator: "\n") ?? []), ["bands/3", "bands/4"]) + } + + func testDeadlineStopsReading() throws { + let r = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], + deadline: "0") + XCTAssertEqual(r.status, 0) + XCTAssertEqual(r.reads, []) + XCTAssertTrue(r.stderr.contains("bands/3: deadline reached"), r.stderr) + XCTAssertTrue(r.stderr.contains("rebound 0 dirty file(s)"), r.stderr) + XCTAssertTrue(r.stderr.contains("2 left unread"), r.stderr) + } + + // MARK: repair (rclone-tm ExecStartPre, rclone not running) + + /// What the bug leaves behind: clean, empty, no fingerprint, no ranges. It holds no data + /// (not dirty), so removing it makes rclone read the band from Drive again. + func testRepairRemovesEmptyCleanEntriesLeftByTheBug() throws { + let r = try run("repair", entries: [Entry(path: "bands/3", meta: leftover, dataSize: 0)]) + XCTAssertEqual(r.status, 0) + XCTAssertFalse(r.left.contains("vfsMeta/\(remoteDir)/bands/3"), "\(r.left)") + XCTAssertFalse(r.left.contains("vfs/\(remoteDir)/bands/3"), "\(r.left)") + XCTAssertTrue(r.stderr.contains("bands/3"), r.stderr) + } + + /// Anything that may hold data the remote does not have stays. + func testRepairNeverTouchesEntriesThatMayHoldData() throws { + let emptyNew = leftover.replacingOccurrences(of: "\"Dirty\": false", with: "\"Dirty\": true") + let emptyReal = leftover.replacingOccurrences( + of: "\"Fingerprint\": \"\"", + with: "\"Fingerprint\": \"0,2026-11-30 10:14:05 +0000 UTC,d41d8cd98f00b204e9800998ecf8427e\"") + let keep = [ + Entry(path: "bands/a", meta: emptyNew, dataSize: 0), // dirty and empty + Entry(path: "bands/b", meta: clean, dataSize: band), // normal + Entry(path: "bands/c", meta: leftover, dataSize: 5), // data on disk + Entry(path: "bands/d", meta: emptyReal, dataSize: 0), // a real empty file + Entry(path: "bands/e", meta: neverUploaded, dataSize: 8192), // new band + Entry(path: "bands/f", meta: rewritten, dataSize: band), // rewritten band + ] + let r = try run("repair", entries: keep) + XCTAssertEqual(r.status, 0) + for e in keep { + XCTAssertTrue(r.left.contains("vfsMeta/\(remoteDir)/\(e.path)"), "\(e.path) meta removed") + XCTAssertTrue(r.left.contains("vfs/\(remoteDir)/\(e.path)"), "\(e.path) data removed") + } + } + + /// Metadata whose data file is already gone is the same empty state. + func testRepairRemovesTheEmptyEntryWithoutDataFile() throws { + let r = try run("repair", entries: [Entry(path: "bands/3", meta: leftover, dataSize: nil)]) + XCTAssertFalse(r.left.contains("vfsMeta/\(remoteDir)/bands/3"), "\(r.left)") + } + + func testRepairWorksForARemoteWithoutSubfolder() throws { + let r = try run( + "repair", entries: [Entry(path: "bands/3", meta: leftover, dataSize: 0)], + cacheRemoteDir: "gdrive{7LdmB}", remote: "gdrive:") + XCTAssertFalse(r.left.contains("vfsMeta/gdrive{7LdmB}/bands/3"), "\(r.left)") + XCTAssertFalse(r.left.contains("vfs/gdrive{7LdmB}/bands/3"), "\(r.left)") + } + + func testRepairCoversBothCacheFoldersAtOnce() throws { + let r = try run( + "repair", + entries: [ + Entry(path: "bands/3", meta: leftover, dataSize: 0, dir: "gdrive/CloudMachine/test-vm-tm"), + Entry(path: "bands/4", meta: leftover, dataSize: 0, dir: remoteDir), + ]) + XCTAssertEqual(r.left, [], "\(r.left)") + } + + func testRepairLeavesOtherRemotesAlone() throws { + let r = try run( + "repair", entries: [Entry(path: "bands/3", meta: leftover, dataSize: 0)], + cacheRemoteDir: "gdrive{x}/CloudMachine/other") + XCTAssertTrue(r.left.contains("vfsMeta/gdrive{x}/CloudMachine/other/bands/3"), "\(r.left)") + } + + func testUnknownModeOrNoRemoteIsHarmless() throws { + XCTAssertEqual(try run("bogus", entries: []).status, 0) + XCTAssertEqual(try run("rebind", entries: [], remote: "").status, 0) + } + + /// Ubuntu's /bin/sh is dash. Not on macOS: there the live run (vm/tests/vfs-restart.sh on + /// the test machine) is the check. + func testBothModesRunUnderDash() throws { + let dash = "/bin/dash" + guard FileManager.default.isExecutableFile(atPath: dash) else { + throw XCTSkip("no \(dash) on this host") + } + let rebind = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: rewritten, dataSize: band), + ], shell: dash) + XCTAssertEqual(Set(rebind.reads), ["/srv/tm/bands/3", "/srv/tm/bands/4"]) + XCTAssertTrue(rebind.stderr.contains("rebound 2 dirty file"), rebind.stderr) + let held = try run( + "rebind", + entries: [ + Entry(path: "bands/3", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + ], failing: ["/srv/tm/bands/4"], shell: dash, + queue: [ + Queued(id: 7, name: "bands/3", expiry: 200), Queued(id: 8, name: "bands/4", expiry: 300), + ]) + XCTAssertEqual(Set(held.held), ["expiry id=7&expiry=3600", "expiry id=8&expiry=3600"]) + XCTAssertEqual(held.restored.count, 1, "\(held.events)") + XCTAssertEqual(held.state["vfs-unbound"], "bands/4\n") + // The retry (hold again, read what is left, give the time back) under dash as well. + let due = Int(Date().timeIntervalSince1970) + 120 + let retry = try run( + "retry", + entries: [ + Entry(path: "bands/4", meta: neverUploaded, dataSize: 8192), + Entry(path: "bands/5", meta: neverUploaded, dataSize: 8192), + ], failing: ["/srv/tm/bands/5"], shell: dash, + queue: [ + Queued(id: 8, name: "bands/4", expiry: 3500), Queued(id: 9, name: "bands/5", expiry: 3500), + ], + state: [ + "vfs-rebound-pid": "4242\n", "vfs-unbound": "bands/4\nbands/5\n", + "vfs-held": "8\t\(due)\tbands/4\n9\t\(due)\tbands/5\n", + ]) + XCTAssertEqual(retry.reads, ["/srv/tm/bands/4"]) + XCTAssertEqual(Set(retry.held), ["expiry id=8&expiry=3600", "expiry id=9&expiry=3600"]) + XCTAssertEqual(retry.restored.count, 1, "\(retry.events)") + XCTAssertEqual(retry.state["vfs-unbound"], "bands/5\n") + let repair = try run( + "repair", entries: [Entry(path: "bands/3", meta: leftover, dataSize: 0)], shell: dash) + XCTAssertEqual(repair.left, [], "\(repair.left)") + } + + // MARK: wiring + + private func file(_ path: String) throws -> String { + try String(contentsOf: Self.repoRoot.appendingPathComponent(path), encoding: .utf8) + } + + private func lines(_ text: String, _ prefix: String) -> [String] { + text.split(separator: "\n").map(String.init).filter { $0.hasPrefix(prefix) } + } + + /// Repair while rclone is down; rebind once the mount is up, as the first thing punchfs + /// runs: punchfs starts only after rclone-tm is active (After=; every restart of + /// rclone-tm, kill -9 included, restarts it through Requires=, journal on cmtest + /// 30.11.2026), and the bind and smbd only after punchfs. + /// Why not an ExecStartPost= of rclone-tm: VMLayoutTests bans ExecStartPost= in the + /// chain since #66 (28.11.2026), where rclone-tm and punchfs used it to `systemctl + /// start` the next unit; the PR kept one recovery mechanism, cm-smb-heal.timer, + /// working from the units' state instead of from systemd events. The ban is about + /// starting units, not about time; the time limit that does apply here is punchfs's + /// start timeout (an ExecStartPre= counts in it), see the next test. + func testUnitsRunTheGuardAroundTheMount() throws { + let rclone = try file("vm/systemd/rclone-tm.service") + let pre = lines(rclone, "ExecStartPre=") + // "-": a guard problem must never stop the mount; repair after the stale-mount cleanup. + XCTAssertEqual(pre.last, "ExecStartPre=-/usr/local/sbin/cm-vfs-guard repair", "\(pre)") + XCTAssertTrue(pre.first?.contains("cm-unmount-stale") ?? false, "\(pre)") + XCTAssertEqual(lines(rclone, "ExecStartPost="), []) + XCTAssertFalse(rclone.contains("cm-vfs-guard rebind")) + + let punchfs = try file("vm/systemd/punchfs.service") + XCTAssertTrue(punchfs.contains("\nRequires=rclone-tm.service\n")) + XCTAssertTrue(punchfs.contains("\nAfter=rclone-tm.service\n")) + let ppre = lines(punchfs, "ExecStartPre=") + XCTAssertEqual(ppre.last, "ExecStartPre=-/usr/local/sbin/cm-vfs-guard rebind", "\(ppre)") + XCTAssertTrue(ppre.first?.contains("cm-unmount-stale") ?? false, "\(ppre)") + // CM_REMOTE; "-": a machine without vm.env must not fail punchfs on it. + XCTAssertTrue(punchfs.contains("\nEnvironmentFile=-/etc/cloudmachine/vm.env\n"), punchfs) + + let bind = try file("vm/systemd/tm-bands-bind.service") + XCTAssertTrue(bind.contains("\nAfter=punchfs.service\n")) + XCTAssertTrue( + try file("vm/systemd/smbd.service.d/cloudmachine.conf").contains("punchfs.service")) + } + + /// The rebind deadline plus one last read must fit in punchfs's start timeout, or + /// systemd kills the start and Restart=always repeats it. systemd's default is 90 s. + func testRebindDeadlineFitsInPunchfsStartTimeout() throws { + let script = try file("vm/cm-vfs-guard.sh") + func defaultOf(_ name: String) throws -> Int { + let m = try XCTUnwrap( + script.range(of: "\\$\\{\(name):-[0-9]+\\}", options: .regularExpression), + "\(name) has no default") + return try XCTUnwrap(Int(script[m].filter(\.isNumber))) + } + let deadline = try defaultOf("CM_VFS_DEADLINE") + let read = try defaultOf("CM_VFS_READ_TIMEOUT") + XCTAssertEqual(deadline, 900) + let punchfs = try file("vm/systemd/punchfs.service") + let line = try XCTUnwrap( + lines(punchfs, "TimeoutStartSec=").first, "punchfs has the 90 s default") + let value = String(line.dropFirst("TimeoutStartSec=".count)) + var seconds = 0 + if value.hasSuffix("min") { + seconds = (Int(value.dropLast(3)) ?? 0) * 60 + } else { + seconds = Int(value.hasSuffix("s") ? String(value.dropLast()) : value) ?? 0 + } + // + a margin for the stale-mount cleanup before it and the find over the cache. + XCTAssertGreaterThanOrEqual(seconds, deadline + read + 120, line) + // The uploads wait while it reads (decision 1): held for longer than the whole run, + // or a band whose hold ran out is uploaded before its read, as without the guard. + let hold = try defaultOf("CM_VFS_HOLD") + XCTAssertGreaterThanOrEqual(hold, seconds + 300, "a hold that runs out mid-rebind") + } + + /// The healer's retry: its deadline, then one last band - forget, refresh and the read + /// (with `timeout -k 5`) - must end inside cm-smb-heal's start timeout, or systemd kills + /// it mid-way and the band waits for the next minute. + func testRetryOfAForgottenBandFitsInTheHealerTimeout() throws { + let script = try file("vm/cm-vfs-guard.sh") + let start = try XCTUnwrap(script.range(of: "relookup() {\n")) + let body = script[start.upperBound...] + let end = try XCTUnwrap(body.range(of: "\n}\n")) + let relookup = String(body[.., mounted: Bool = true, holdAgeMinutes: Double? = nil, - attention: Bool = false + attention: Bool = false, unbound: Bool = false, retryReadsAll: Bool = false ) throws -> [String] { let dir = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString) try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: true) @@ -455,12 +455,22 @@ final class VMLayoutTests: XCTestCase { attributes: [.modificationDate: Date().addingTimeInterval(-minutes * 60)]) } if attention { FileManager.default.createFile(atPath: attentionFile, contents: nil) } + // cm-vfs-guard's marker of bands left unread after an rclone restart, and the guard: + // logs its call; `retryReadsAll` = it reads the rest and lifts the marker. + let unboundFile = dir.appendingPathComponent("vfs-unbound").path + if unbound { try "bands/4\n".write(toFile: unboundFile, atomically: true, encoding: .utf8) } + try write( + "cm-vfs-guard", + "echo \"guard $1 deadline=$CM_VFS_DEADLINE\" >> \(log)" + + (retryReadsAll ? "; rm -f \(unboundFile)" : "")) let p = Process() p.executableURL = URL(fileURLWithPath: "/bin/sh") p.arguments = [Self.repoRoot.appendingPathComponent("vm/cm-smb-heal.sh").path] p.environment = [ "PATH": dir.path + ":/usr/bin:/bin", "CM_SMBD_HOLD": hold, "CM_SMBD_ATTENTION": attentionFile, "CM_BUNDLE_ENV": env, + "CM_VFS_UNBOUND": unboundFile, + "CM_VFS_GUARD": dir.appendingPathComponent("cm-vfs-guard").path, ] p.standardError = FileHandle.nullDevice try p.run() @@ -492,6 +502,30 @@ final class VMLayoutTests: XCTestCase { XCTAssertEqual(try runHealer(active: bound, holdAgeMinutes: 125), ["--no-block start smbd"]) } + /// Bands left unread after an rclone restart (cm-vfs-guard rebind, decision 2 of + /// 30.11.2026): the healer retries them each minute, within its own start timeout, and + /// starts Samba only once none is left. No restart of any unit: no restart loop. + func testHealerRetriesUnreadBandsBeforeSamba() throws { + let bound: Set = ["rclone-tm", "punchfs", "tm-bands-bind"] + XCTAssertEqual(try runHealer(active: bound, unbound: true), ["guard retry deadline=30"]) + XCTAssertEqual( + try runHealer(active: bound, unbound: true, retryReadsAll: true), + ["guard retry deadline=30", "--no-block start smbd"]) + XCTAssertEqual( + try runHealer(active: ["punchfs", "tm-bands-bind"], unbound: true), [], + "rclone down: nothing to read through") + XCTAssertEqual( + try runHealer(active: ["rclone-tm", "tm-bands-bind"], unbound: true), [], + "punchfs not active (its own rebind may be running): no second run next to it") + XCTAssertEqual(try runHealer(active: bound), ["--no-block start smbd"], "no marker, no retry") + // The retry's deadline plus one stuck read (timeout 20 s, -k 5) and rc calls fit in + // the healer's start timeout. + let service = try unit("vm/systemd/cm-smb-heal.service") + let line = try XCTUnwrap( + service.split(separator: "\n").first { $0.hasPrefix("TimeoutStartSec=") }) + XCTAssertGreaterThanOrEqual(Int(line.dropFirst("TimeoutStartSec=".count)) ?? 0, 30 + 25 + 30) + } + /// A failed operation's attention file beats everything, expired marker or not. func testHealerNeverStartsSambaUnderAttention() throws { let bound: Set = ["punchfs", "tm-bands-bind"] diff --git a/mac-app/Tests/CloudMachineAppTests/VMUpdateRestartTests.swift b/mac-app/Tests/CloudMachineAppTests/VMUpdateRestartTests.swift new file mode 100644 index 0000000..15606ae --- /dev/null +++ b/mac-app/Tests/CloudMachineAppTests/VMUpdateRestartTests.swift @@ -0,0 +1,259 @@ +import XCTest + +@testable import CloudMachineCore + +/// Review of PR #80 (30.11.2026): the first boot after `vm-update` started rclone, punchfs +/// and smbd from the OLD units. Lima writes the new units only in cloud-final (provisioning), +/// and its `daemon-reload` restarts nothing; an rclone restart with bands waiting for upload +/// is the bug that serves them as zeros, and the old units have no guard. So `vm-update` +/// refuses while anything waits for upload, and disables the share's units before the stop: +/// boot 1 starts them only from provisioning, on the new units. +final class VMUpdateRestartTests: XCTestCase { + private actor Log { + var calls: [String] = [] + var scripts: [String] = [] + func add(_ call: String, script: String? = nil) { + calls.append(call) + if let script { scripts.append(script) } + } + } + + private func result(_ code: Int32, _ out: String = "") -> ProcessResult { + ProcessResult(stdout: out, stderr: "", exitCode: code) + } + + /// The restart on fakes: `quiesce` answers the first shell script, `stops` the stops. + private func restart( + quiesce: ProcessResult?, stops: [Bool] = [true, true], replaceFails: Bool = false + ) async -> (failure: String?, calls: [String], scripts: [String]) { + let log = Log() + let stopsLeft = StopAnswers(stops) + let machine = VMUpdate.Machine( + shell: { script in + let first = await log.scripts.isEmpty + await log.add(first ? "shell:quiesce" : "shell", script: script) + return first ? quiesce : self.result(0) + }, + stop: { + await log.add("stop") + return await stopsLeft.next() + }, + start: { + await log.add("start") + return CMActionResult(succeeded: true, message: "") + }) + let failure = await VMUpdate.restartOnNewTemplate( + machine, + replaceTemplate: { + await log.add("replace") + if replaceFails { throw CocoaError(.fileWriteNoPermission) } + }, backupPath: "/x/lima.yaml.before") + return (failure, await log.calls, await log.scripts) + } + + private actor StopAnswers { + var answers: [Bool] + init(_ answers: [Bool]) { self.answers = answers } + func next() -> Bool { answers.isEmpty ? true : answers.removeFirst() } + } + + func testServicesAreDisabledBeforeTheFirstStop() async throws { + let r = await restart(quiesce: result(0, "CM-QUIESCED\n")) + XCTAssertNil(r.failure) + XCTAssertEqual(r.calls, ["shell:quiesce", "stop", "replace", "start", "stop", "start"]) + let script = try XCTUnwrap(r.scripts.first) + let disable = try XCTUnwrap( + script.range(of: "systemctl disable rclone-tm punchfs tm-bands-bind smbd"), script) + let queue = try XCTUnwrap(script.range(of: "vfs/queue")) + XCTAssertLessThan(queue.lowerBound, disable.lowerBound, "checked before anything changes") + } + + /// Bands waiting for upload: refused before the stop, nothing changed, in plain words. + func testUnsentBandsRefuseTheUpdate() async { + let r = await restart(quiesce: result(3, "CM-UNSENT 4 2\n")) + XCTAssertEqual(r.calls, ["shell:quiesce"]) + XCTAssertEqual( + r.failure, + L10n.tr( + "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.", + "4", "2")) + } + + /// rclone did not answer (or the machine did not): the queue is unknown, not empty. A + /// check cut off mid-way may already have disabled the units: they are enabled again. + func testUnknownQueueRefusesTheUpdate() async { + for (answer, calls) in [ + (result(5, "CM-NO-RC\n"), ["shell:quiesce"]), (nil, ["shell:quiesce", "shell"]), + (result(1), ["shell:quiesce", "shell"]), + ] { + let r = await restart(quiesce: answer) + XCTAssertEqual(r.calls, calls) + if calls.count == 2 { XCTAssertEqual(r.scripts.last, VMUpdate.reenableScript) } + XCTAssertEqual( + r.failure, L10n.tr("No answer from rclone in the machine - the upload queue is unknown.")) + } + } + + /// The stop failed: the machine runs on as it was, so its units are enabled again and + /// Samba (stopped for the check) is started. + func testFailedStopEnablesTheServicesAgain() async throws { + let r = await restart(quiesce: result(0, "CM-QUIESCED\n"), stops: [false]) + XCTAssertEqual(r.calls, ["shell:quiesce", "stop", "shell"]) + XCTAssertEqual(r.failure, L10n.tr("limactl stop failed - nothing was changed.")) + let back = try XCTUnwrap(r.scripts.last) + XCTAssertTrue(back.contains("systemctl enable rclone-tm punchfs tm-bands-bind smbd"), back) + XCTAssertTrue(back.contains(VMLayout.startSmbd), back) + } + + /// The template could not be replaced: the old one boots again; its provisioning enables + /// the units again (the same step 6 as the new one). + func testFailedReplaceStartsTheOldTemplate() async { + let r = await restart(quiesce: result(0, "CM-QUIESCED\n"), replaceFails: true) + XCTAssertEqual(r.calls, ["shell:quiesce", "stop", "replace", "start"]) + XCTAssertNotNil(r.failure) + } + + /// Provisioning (cloud-final, boot 1) writes the units, reloads systemd, enables the + /// disabled units again and starts them from the new files. + func testProvisioningEnablesAndStartsTheUnitsAfterTheReload() throws { + let root = URL(fileURLWithPath: #filePath).deletingLastPathComponent() + .deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() + let yaml = try String( + contentsOf: root.appendingPathComponent("vm/cmsmb.yaml"), encoding: .utf8) + let reload = try XCTUnwrap(yaml.range(of: "systemctl daemon-reload")) + let units = "rclone-tm.service punchfs.service tm-bands-bind.service smbd.service" + let enable = try XCTUnwrap(yaml.range(of: "systemctl enable \(units)")) + let start = try XCTUnwrap(yaml.range(of: "systemctl start \(units)")) + XCTAssertLessThan(reload.lowerBound, enable.lowerBound) + XCTAssertLessThan(enable.lowerBound, start.lowerBound) + } + + // MARK: the check in the machine, run for real on fakes + + private struct Run { + var status: Int32 + var stdout: String + var systemctl: [String] + } + + /// `quiesceScript` under bash with fake `curl` (rc), `systemctl` (logged) and a fake cache. + private func quiesce( + queue: String, dirty: [String] = [], rcDown: Bool = false, + vfs: String = "gdrive{7LdmB}:CloudMachine/test-vm-tm" + ) throws -> Run { + let fm = FileManager.default + let dir = fm.temporaryDirectory.appendingPathComponent(UUID().uuidString) + try fm.createDirectory(at: dir, withIntermediateDirectories: true) + defer { try? fm.removeItem(at: dir) } + let cache = dir.appendingPathComponent("cache").path + let clean = "{\n\t\"Size\": 1,\n\t\"Fingerprint\": \"x\",\n\t\"Dirty\": false\n}\n" + let dirtyMeta = "{\n\t\"Size\": 1,\n\t\"Fingerprint\": \"\",\n\t\"Dirty\": true\n}\n" + var files = ["gdrive{7LdmB}/CloudMachine/test-vm-tm/bands/1": clean] + for d in dirty { files[d] = dirtyMeta } + for (path, body) in files { + let url = URL(fileURLWithPath: "\(cache)/vfsMeta/\(path)") + try fm.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true) + try body.write(to: url, atomically: true, encoding: .utf8) + } + func write(_ name: String, _ body: String) throws { + let url = dir.appendingPathComponent(name) + try ("#!/bin/sh\n" + body + "\n").write(to: url, atomically: true, encoding: .utf8) + try fm.setAttributes([.posixPermissions: 0o755], ofItemAtPath: url.path) + } + try queue.write(to: dir.appendingPathComponent("queue.json"), atomically: true, encoding: .utf8) + try "{\n\t\"vfses\": [\n\t\t\"\(vfs)\"\n\t]\n}\n".write( + to: dir.appendingPathComponent("list.json"), atomically: true, encoding: .utf8) + try write( + "curl", + (rcDown ? "exit 7\n" : "") + "for a; do u=\"$a\"; done\ncase \"$u\" in\n" + + " */vfs/queue) cat '\(dir.path)/queue.json';;\n" + + " */vfs/list) cat '\(dir.path)/list.json';;\n *) exit 22;;\nesac") + let sys = dir.appendingPathComponent("systemctl.log").path + try write("systemctl", "echo \"$*\" >> '\(sys)'") + let hold = dir.appendingPathComponent("hold").path + let script = VMUpdate.quiesceScript(cacheDir: cache) + .replacingOccurrences(of: VMLayout.Guest.smbdHold, with: hold) + let p = Process() + p.executableURL = URL(fileURLWithPath: "/bin/bash") + p.arguments = ["-c", script] + p.environment = ["PATH": dir.path + ":/usr/bin:/bin"] + let out = Pipe() + p.standardOutput = out + p.standardError = FileHandle.nullDevice + try p.run() + p.waitUntilExit() + let text = String(data: out.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8) ?? "" + let calls = ((try? String(contentsOfFile: sys, encoding: .utf8)) ?? "") + .split(separator: "\n").map(String.init) + return Run(status: p.terminationStatus, stdout: text, systemctl: calls) + } + + private let emptyQueue = "{\n\t\"queue\": []\n}\n" + private let twoQueued = """ + { + \t"queue": [ + \t\t{ + \t\t\t"name": "bands/1", + \t\t\t"id": 7, + \t\t\t"size": 33554432, + \t\t\t"expiry": 120.5, + \t\t\t"tries": 0, + \t\t\t"delay": 600, + \t\t\t"uploading": false + \t\t}, + \t\t{ + \t\t\t"name": "bands/2", + \t\t\t"id": 8, + \t\t\t"size": 33554432, + \t\t\t"expiry": -3, + \t\t\t"tries": 0, + \t\t\t"delay": 600, + \t\t\t"uploading": true + \t\t} + \t] + } + + """ + + /// Nothing waiting: Samba is stopped first (no new writes), then the units are disabled. + func testEmptyQueueDisablesTheUnitsAfterStoppingSamba() throws { + let r = try quiesce(queue: emptyQueue) + XCTAssertEqual(r.status, 0, r.stdout) + XCTAssertTrue(r.stdout.contains("CM-QUIESCED"), r.stdout) + let stop = try XCTUnwrap(r.systemctl.firstIndex(of: "stop smbd"), "\(r.systemctl)") + let disable = try XCTUnwrap( + r.systemctl.firstIndex(of: "disable rclone-tm punchfs tm-bands-bind smbd"), + "\(r.systemctl)") + XCTAssertLessThan(stop, disable) + } + + func testQueuedUploadsRefuseAndStartSambaAgain() throws { + let r = try quiesce(queue: twoQueued) + XCTAssertEqual(r.status, 3) + XCTAssertTrue(r.stdout.contains("CM-UNSENT 2 0"), r.stdout) + XCTAssertFalse(r.systemctl.contains { $0.hasPrefix("disable") }, "\(r.systemctl)") + XCTAssertTrue(r.systemctl.contains("start smbd"), "\(r.systemctl)") + } + + /// A dirty file of the running rclone's cache folder, even with an empty queue. + func testDirtyFileInTheCurrentCacheRefuses() throws { + let r = try quiesce( + queue: emptyQueue, dirty: ["gdrive{7LdmB}/CloudMachine/test-vm-tm/bands/9"]) + XCTAssertEqual(r.status, 3) + XCTAssertTrue(r.stdout.contains("CM-UNSENT 0 1"), r.stdout) + XCTAssertFalse(r.systemctl.contains { $0.hasPrefix("disable") }, "\(r.systemctl)") + } + + /// An older `{hash}` folder is not this rclone's: its leftovers do not block. + func testDirtyFileInAnOldCacheFolderDoesNotRefuse() throws { + let r = try quiesce(queue: emptyQueue, dirty: ["gdrive{old}/CloudMachine/test-vm-tm/bands/9"]) + XCTAssertEqual(r.status, 0, r.stdout) + } + + func testNoAnswerFromRcloneRefuses() throws { + let r = try quiesce(queue: emptyQueue, rcDown: true) + XCTAssertEqual(r.status, 5) + XCTAssertFalse(r.systemctl.contains { $0.hasPrefix("disable") }, "\(r.systemctl)") + XCTAssertTrue(r.systemctl.contains("start smbd"), "\(r.systemctl)") + } +} diff --git a/vm/README.md b/vm/README.md index 17feeaf..ed1d0f8 100644 --- a/vm/README.md +++ b/vm/README.md @@ -152,6 +152,118 @@ requests for 14 bands (about 7 per `F_FULLFSYNC`) and every written band had an `FSYNC` after its last `WRITE`; nothing in the chain needs a "fsync all fds" barrier of its own. +## Bands read as zeros after an rclone restart + +Found 30.11.2026 on the test machine (E6, `kill-rclone`, client idle with the image attached); +most likely also behind the lost history of 28.11 and `VerificationState=2` of 29.11. + +**What happens (rclone 1.75.1, `--vfs-cache-mode full`).** A band that Time Machine has just +created is dirty in the VFS cache and not yet on Drive (write-back 600 s; while the client keeps +the image attached, smbd keeps the band open and the write-back does not even start). When rclone +stops for ANY reason (`kill -9`, OOM, `systemctl restart`, a machine or Mac restart), the next +start reloads the band from the cache: `item.reload` opens it with no remote object, closes it with +no store function and adds it to the directory as a virtual entry whose object is nil. Samba lists +`bands/` before the upload ends (and `--dir-cache-time 9999h` never lists it again), the upload +succeeds ("Copied (new)"), but the VFS entry never learns the new object. The first open after +the upload sees "no remote object, clean cache entry", logs +`vfs cache: removed cache file as stale (remote deleted)` and leaves an empty cache file with +`Size 0`, `Rs null`, no fingerprint. Reads stop at the size of that empty file before rclone even +opens it, so the band reads as 0 bytes (32 MiB of zeros through punchfs and Samba) while Drive +holds it intact, and it stays like that after every later restart. The next backup writes into the +"empty" band, and the zeros reach Drive too: `fsck_apfs` "found zeroed-out block", then +`VerificationState=2` and a lost history. + +**The fix** (`cm-vfs-guard`, shipped in `punchfs/src.tar.gz.b64` and installed to +`/usr/local/sbin` by provisioning): + +- `punchfs.service` `ExecStartPre=cm-vfs-guard rebind`: punchfs starts only once rclone-tm is + active, and every restart of rclone-tm (`kill -9` included: `Requires=`) restarts it; the bind + and smbd come after punchfs. So before anything opens a band, it reads one byte of every dirty + file through `/srv/tm`. That open and close re-queues the write-back with the VFS's store + function (log: `vfs cache: writeback object to VFS layer`), so the band keeps the uploaded + object. Both kinds of dirty file need it: a band never uploaded reads as zeros after the + upload, and a band already on Drive and written again keeps the OLD object, so after the + upload the next open logs `stale (remote is different)` and serves the previous version from + Drive (cmtest, rebind limited to bands without a fingerprint: 29 such lines in 2 cycles; 0 in + 8 cycles reading every dirty band). It is not an `ExecStartPost=` of rclone-tm: since #66 nothing in the chain starts + anything after its own start (the healer is the one reviver, `VMLayoutTests`). +- `rclone-tm.service` `ExecStartPre=cm-vfs-guard repair`: removes the empty, clean, + fingerprint-less cache entries the bug leaves behind, so those bands are read from Drive + again. It never touches a dirty entry or one with data on disk. It only helps when nothing + wrote into the band after the damage; `rebind` is what prevents it. + +Both exit 0 (`-` in the units as well). `rebind` reads inside the first cached range, so it +never goes to the network and Drive's upload limit cannot block it. More rules, each from a +review of 30.11.2026: + +- **The uploads wait for the reads.** `--vfs-write-back 600s` counts from the reload, before + the mount is up, and the reads may take up to the deadline: a band uploaded before its read + is the bug again. Before the first read, `rebind` pushes back every queued upload of a file + it will read (`rc vfs/queue-set-expiry`, `CM_VFS_HOLD` 3600 s, longer than punchfs's + `TimeoutStartSec=20min`) and keeps each one's own time in `/run/cloudmachine/vfs-held`; + after the reads each upload gets its time back. +- **An upload already running is not secured.** It cannot be held, and it runs without the + store function, so a read during it binds nothing (cmtest: band read during its upload, + Samba up, after the upload 0 B through the mount, Drive correct). Such a band stays in + `vfs-unbound` (Samba off) and in `/run/cloudmachine/vfs-forget`. Once it has left the + queue, the retry forgets it (`rc vfs/forget`), lists its folder again (`vfs/refresh`) and + drops the kernel's dentries (`drop_caches=2`) before it reads: forget alone left the open on + the kernel's cached inode, the node without an object ("stale", 0 B); with the three, md5 + through the mount equals Drive. A read counts only if it returns its byte (`dd` also ends + well on the empty entry "stale" leaves); 0 bytes only for a file that is empty for real. +- **Only the cache folder of the running rclone** (`rc vfs/list`): after a change of the + config overrides an older `{hash}` folder is not in this rclone's VFS. No answer from + the rc = nothing proven, Samba stays off (next point). +- **Bands left unread keep Time Machine out.** It stops at a deadline (`CM_VFS_DEADLINE`, + 900 s), names each file it left and ends with one line: + `rebound N dirty file(s) to the VFS before serving, M left unread` (`journalctl -u punchfs`). + Unread bands stay held and are listed in `/run/cloudmachine/vfs-unbound` (`*` while a rebind + runs or when the rc did not answer); smbd's drop-in refuses to start while it exists, and + `cm-smb-heal` (every minute, no restart of any unit) runs `cm-vfs-guard retry` with a 30 s + deadline until none is left, then starts Samba. `backup-health` and `vm-status` say + "N band(s) not secured after an rclone restart". +- **One run at a time** (`/run/cloudmachine/vfs-lock`, the pid of the run; a killed run's + lock is taken over): the healer's retry leaves a running rebind alone, and runs only while + punchfs is active, so never next to punchfs's own rebind. A retry for an rclone that + restarted without punchfs rebinds everything. A killed run's list is never read again; + an unreadable queue keeps the saved times; names rclone's JSON escapes (`&`, `<`, `>`, + `"`, `\`) are held too. While punchfs starts, `vm-status` and `backup-health` do not + report the rebind's own `*` as an alarm. +- **A restart of punchfs alone** (`vm-prepare-bundle`) does not read again: the rebind + remembers rclone-tm's MainPID (`/run/cloudmachine/vfs-rebound-pid`); with the same rclone it + only retries what is left. So `startSmbd` (120 s) after such a restart never waits for a + rebind; a restart of rclone-tm itself waits in `systemctl restart`, which `vm-encrypt` gives + 30 min. + +**`vm-update` restarts rclone too, on new units.** Lima writes the template's units only in +cloud-final, so the first boot after an update would start the OLD rclone-tm, punchfs and smbd +(without the guard) before provisioning. `vm-update` therefore stops Samba and refuses while +rclone's upload queue holds anything or the running rclone's cache folder has a dirty file +(as `vm-encrypt` does before its restart), then disables `rclone-tm punchfs tm-bands-bind +smbd` before `limactl stop`; provisioning enables and starts them after its `daemon-reload` +(cmtest: none of them started before cloud-final). A failed stop enables them again. + +`vm/tests/vfs-restart.sh` is the live check (test machine only): `kill9`, `restart` and +`repair` rounds; the check with a Time Machine client needs the tart client and runs from the Mac. + +| 30.11.2026, cmtest + tart client | runs | result | +|---|---|---| +| new file, restart, folder listed, upload, read (no client) | kill -9, restart | 0 B through the mount, Drive md5 correct | +| same with `rebind` | kill -9, restart | md5 equal to Drive | +| client backup, image attached, `kill -9` of rclone, no fix (control) | 1 | 9 bands 0 B, `fsck_apfs` "found zeroed-out block" | +| same with the fix, `kill -9` | 8 in a row (5 with the image attached at the kill) | next backup `RESULT=0` every time, history 2 -> 20 backups, 0 bands differing from Drive, no new "stale (remote deleted)", `fsck_apfs` clean, `VerificationState` unchanged | +| same with the fix, `systemctl restart rclone-tm` | 1 | as above | +| Samba restarted alone, image attached (2 sessions) | 1 | as above: a Samba restart by itself does not damage the image | +| upload already running at the restart, read during it (guard of e54c070, control) | 1 | 0 B through the mount after the upload, Drive correct | +| same, `vfs/forget` only before the read | 1 | still "stale", 0 B (refused by the 1-byte rule, Samba stays off) | +| same, forget + refresh + `drop_caches` after the upload | 2 | md5 equal to Drive, no "stale" | +| final version, `kill -9` with the image attached + `systemctl restart` | 5 + 1 | `RESULT=0` every time, 0 bands differing from Drive, no new "stale", `fsck_apfs` clean | +| `rebind` in punchfs, only dirty bands WITHOUT a fingerprint, `kill -9` | 5 | 1 band per run in 4 runs served its OLD version from Drive, 29 "stale (remote is different)": rewritten bands need the rebind too | +| fresh image, `rebind` in punchfs (every dirty band), `kill -9`, image attached at every kill | 5 | next backup `RESULT=0` every time, history 2 -> 12, 0 bands differing from Drive, no new "stale (remote deleted)" or "stale (remote is different)", `fsck_apfs` clean (after runs 3-5; cumulative), `VerificationState` 1 | +| same, `systemctl restart rclone-tm` | 1 | as above | +| same image, guard disabled (control) | 1 | 9 bands 0 B, 1 band an old version, +20 "remote deleted", +6 "remote is different" | +| `vm/tests/vfs-restart.sh` kill9, restart, repair | 1 each | PASS | + ## Deploying a change to the fsync chain Verify the PROCESSES, not the unit files (a unit file on disk says nothing diff --git a/vm/cm-smb-heal.sh b/vm/cm-smb-heal.sh index ec6baa3..bcca11c 100755 --- a/vm/cm-smb-heal.sh +++ b/vm/cm-smb-heal.sh @@ -29,9 +29,17 @@ if active punchfs && mountpoint -q /srv/tm-punch && [ -s "$BUNDLE_ENV" ] \ systemctl --no-block start tm-bands-bind fi +# 2a. Bands an rclone restart left unread (cm-vfs-guard): read them again. Samba waits: +# its drop-in refuses to start while the marker exists. Not while punchfs starts: its +# own rebind is running. +UNBOUND="${CM_VFS_UNBOUND:-/run/cloudmachine/vfs-unbound}" +if [ -e "$UNBOUND" ] && active rclone-tm && active punchfs; then + CM_VFS_DEADLINE=30 "${CM_VFS_GUARD:-/usr/local/sbin/cm-vfs-guard}" retry +fi + # 2. bind up, Samba not: start it, unless held on purpose (marker 0..7200 s old) or attention file. if active tm-bands-bind && ! active smbd; then - [ -e "$ATTENTION" ] && exit 0 + [ -e "$ATTENTION" ] || [ -e "$UNBOUND" ] && exit 0 if a=$(age "$HOLD") && [ "$a" -ge 0 ] && [ "$a" -le 7200 ]; then exit 0; fi rm -f "$HOLD" systemctl --no-block start smbd diff --git a/vm/cm-vfs-guard.sh b/vm/cm-vfs-guard.sh new file mode 100644 index 0000000..f8efdc2 --- /dev/null +++ b/vm/cm-vfs-guard.sh @@ -0,0 +1,233 @@ +#!/bin/sh +# Keeps rclone's VFS cache from serving bands as zeros or as an old version after a +# restart (vm/README.md, "Bands read as zeros after an rclone restart"). Always exits 0. +# cm-vfs-guard repair rclone-tm ExecStartPre=: drop clean, empty entries without fingerprint +# cm-vfs-guard rebind punchfs ExecStartPre=: hold the dirty files' uploads, read 1 byte +# of each through the mount, give the uploads their time back; until +# CM_VFS_DEADLINE. What is left stays held and in $ST/vfs-unbound +# (smbd stays off) +# cm-vfs-guard retry cm-smb-heal, every minute: the same for what is left +CACHE="${CM_VFS_CACHE:-/var/cache/rclone}" +MNT="${CM_VFS_MOUNT:-/srv/tm}" +T="${CM_VFS_READ_TIMEOUT:-20}" +RC="${CM_VFS_RC:-http://127.0.0.1:5572}" +ST="${CM_VFS_STATE:-/run/cloudmachine}" +# Seconds an upload waits for its read: longer than punchfs's TimeoutStartSec (20 min); +# a retry holds what is left again. +HOLD="${CM_VFS_HOLD:-3600}" +DEADLINE=$(($(date +%s) + ${CM_VFS_DEADLINE:-900})) +UNBOUND="$ST/vfs-unbound" HELD="$ST/vfs-held" PIDF="$ST/vfs-rebound-pid" +# Uploads already running (without the store function): looked up anew once ended, +# before their first open. BUSY: not to be read this run. +FORGET="$ST/vfs-forget" BUSY="$ST/vfs-busy" +DROP="${CM_VFS_DROP_CACHES:-/proc/sys/vm/drop_caches}" +say() { echo "cm-vfs-guard: $*" >&2; } +rc() { curl -fsS -m 10 -X POST "$RC/$1" 2>/dev/null; } +# Forget a file, list its folder again, drop the kernel's dentries: the next open looks it +# up anew. Forget alone left the open on the kernel's inode, the node without an object +# (cmtest 30.11.2026: "stale", 0 bytes). 5+15 s + a read fit the healer's 90 s. +relookup() { + curl -fsS -m 5 -X POST --data-urlencode "file=$1" "$RC/vfs/forget" >/dev/null 2>&1 \ + && curl -fsS -m 15 -X POST --data-urlencode "dir=$(dirname "$1")" "$RC/vfs/refresh" \ + >/dev/null 2>&1 && echo 2 2>/dev/null >"$DROP" +} +# What "removed cache file as stale (remote deleted)" leaves: nothing local, not dirty. +leftover() { + grep -q '"Dirty": false' "$1" && grep -q '"Fingerprint": ""' "$1" \ + && grep -q '"Size": 0,' "$1" && grep -q '"Rs": null' "$1" +} + +case "$1" in + repair) + [ -n "${CM_REMOTE:-}" ] || { say "CM_REMOTE not set, nothing to do"; exit 0; } + name=${CM_REMOTE%%:*} + sub=${CM_REMOTE#*:} + sub=${sub#/} + sub=${sub%/} + # rclone keeps a remote's cache in /vfsMeta/[{hash}]/ (and vfs/ for + # data); rclone is down, so both folders. + for d in "$CACHE/vfsMeta/$name/$sub" "$CACHE/vfsMeta/$name{"*"}/$sub"; do + d=${d%/} # remote without a subfolder ("gdrive:") + [ -d "$d" ] || continue + data="$CACHE/vfs/${d#"$CACHE/vfsMeta/"}" + find "$d" -type f | while IFS= read -r m; do + leftover "$m" || continue + rel=${m#"$d"/} + [ -s "$data/$rel" ] && continue + say "$rel: empty clean cache entry removed, it is read from Drive again" + rm -f "$data/$rel" "$m" + done + done + exit 0 + ;; + rebind | retry) ;; + *) + say "usage: cm-vfs-guard repair|rebind|retry" + exit 0 + ;; +esac + +# rclone 1.75.1 reloads a dirty file with no object (new: zeros) or the old one (rewritten: +# old version) and uploads it without telling the VFS; an open+close through the mount +# hands the upload the VFS's store function, so the file keeps its object. +mkdir -p "$ST" +# One run at a time: two would share the lists below. A retry leaves a live run alone; a +# rebind waits for it. The lock of a killed run (its pid is gone) is taken over. +L="$ST/vfs-lock" +until mkdir "$L" 2>/dev/null; do + o=$(cat "$L/pid" 2>/dev/null) + if [ -z "$o" ] || kill -0 "$o" 2>/dev/null; then + [ "$1" = retry ] && { say "another run is reading, retry later"; exit 0; } + [ -z "$o" ] && [ -n "$(find "$L" -prune -mmin +1 2>/dev/null)" ] && rm -rf "$L" + sleep 1 + else + rm -rf "$L" + fi +done +echo $$ >"$L/pid" +# "A run is reading" (its start), apart from "*" = "a rebind is owed": vm-status and +# backup-health report a running one as a note until punchfs's start timeout. +date +%s >"$ST/vfs-rebinding" +trap 'rm -rf "$L" "$ST/vfs-rebinding"' EXIT +pid=$(systemctl show -p MainPID --value rclone-tm 2>/dev/null) +mode=$1 +if [ "${pid:-0}" != 0 ] && [ "$(cat "$PIDF" 2>/dev/null)" = "$pid" ]; then + # A restart of punchfs alone (vm-prepare-bundle): this rclone is already rebound. + [ -e "$UNBOUND" ] || { say "rclone (pid $pid) not restarted since the last rebind"; exit 0; } + mode=retry +else + # A new rclone (from the healer too: punchfs is active, did not restart with it). + mode=rebind +fi +[ "$(cat "$UNBOUND" 2>/dev/null)" = "*" ] && mode=rebind +if [ "$mode" = rebind ]; then + # Until the end of this run nothing is proven: killed mid-way, Samba stays off. + echo '*' >"$UNBOUND" + # Held ids belong to one rclone; a killed run of the same one keeps their own times. + [ "$(cat "$PIDF" 2>/dev/null)" = "$pid" ] || rm -f "$HELD" "$FORGET" + echo "$pid" >"$PIDF" +fi + +# The cache folder of the RUNNING rclone (an older {hash} folder is not in its VFS). +v=$(rc vfs/list | tr -d '\n' | sed -n 's/.*"vfses":[[:space:]]*\[[[:space:]]*"\([^"]*\)".*/\1/p') +if [ -z "$v" ]; then + say "no answer from rclone (rc $RC): nothing read, Samba stays off until a retry" + exit 0 +fi +root=${v#*:} +root=${root#/} +d="$CACHE/vfsMeta/${v%%:*}/$root" +d=${d%/} +todo="$ST/vfs-todo" +if [ "$mode" = rebind ]; then + : >"$todo" # not the list of a run that was killed + [ -d "$d" ] && find "$d" -type f | while IFS= read -r m; do + grep -q '"Dirty": true' "$m" && printf '%s\n' "${m#"$d"/}" + done >"$todo" + : >>"$todo" +else + cp "$UNBOUND" "$todo" +fi + +# --vfs-write-back 600s counts from the reload, before the mount was up: hold each queued +# upload of a file to read (vfs/queue-set-expiry), keeping its own time in $HELD. +now=$(date +%s) +if q=$(rc vfs/queue); then + # Names as rclone's JSON writes them: Go escapes & < > as \u00XX, and " and \ too. + printf '%s\n' "$q" | tr '\n' ' ' | tr '{' '\n' | tr '}' '\n' | awk -v now="$now" -v todo="$todo" -v held="$HELD" ' + BEGIN { while ((getline l < todo) > 0) want[l] = 1 + while ((getline l < held) > 0) { split(l, f, "\t"); due[f[1]] = f[2] } } + match($0, /"id": *[0-9]+/) { + id = substr($0, RSTART, RLENGTH); sub(/.*: */, "", id) + n = "" + if (match($0, /"name": *"([^"\\]|\\.)*"/)) { + n = substr($0, RSTART, RLENGTH); sub(/^"name": *"/, "", n); sub(/"$/, "", n) + gsub(/\\u0026/, "\\&", n); gsub(/\\u003c/, "<", n); gsub(/\\u003e/, ">", n) + gsub(/\\"/, "\"", n); gsub(/\\\\/, "\\", n) + } + if (!(n in want)) next + if ($0 ~ /"uploading": *true/) { print "U\t" n; next } + e = 0; if (match($0, /"expiry": *-?[0-9.e+]+/)) { e = substr($0, RSTART, RLENGTH); sub(/.*: */, "", e) } + printf "%s\t%d\t%s\n", id, (id in due) ? due[id] : now + e, n + }' >"$HELD.new" + grep '^U ' "$HELD.new" | cut -f2- >"$BUSY" + cat "$BUSY" >>"$FORGET" # now: a run killed later must not lose them + up=$(grep -c . "$BUSY") + up=${up:-0} + grep -v '^U ' "$HELD.new" >"$HELD" + [ "$up" -gt 0 ] && say "$up already uploading, could not be held: read once uploaded" + cut -f1 "$HELD" | while IFS= read -r id; do + rc "vfs/queue-set-expiry?id=$id&expiry=$HOLD" >/dev/null || say "upload $id: could not be held" + done +else + # The saved times stay: a later run must not take the hold for an upload's own time. + say "upload queue unreadable (rc $RC): the reads are not protected" + # Whether an upload that was running has ended is unknown: those wait. + cp "$FORGET" "$BUSY" 2>/dev/null || : >"$BUSY" + : >"$HELD.new" +fi +rm -f "$HELD.new" +touch "$HELD" + +: >"$todo.left" +ok=0 +while IFS= read -r rel; do + [ -n "$rel" ] || continue + if [ -d "$d" ] && ! [ -e "$d/$rel" ]; then + say "$rel: gone from the cache, nothing to rebind" + continue + elif [ "$(date +%s)" -ge "$DEADLINE" ]; then + say "$rel: deadline reached, not rebound" + else + # In the first cached range: no network. -k: a read stuck in FUSE may ignore SIGTERM. + # The byte must come back (dd ends well on a "stale" empty entry too): "&& echo" adds + # one when dd ended well, so 2 = one byte read; 1 for a file of size 0. + pos=$(grep -m1 '"Pos":' "$d/$rel" 2>/dev/null | tr -cd 0-9) + size=$(grep -m1 '"Size":' "$d/$rel" 2>/dev/null | tr -cd 0-9) + if grep -qxF -- "$rel" "$BUSY" 2>/dev/null; then + say "$rel: its upload is running, read once it has ended" + elif grep -qxF -- "$rel" "$FORGET" 2>/dev/null && ! cut -f3- "$HELD" | grep -qxF -- "$rel" \ + && ! relookup "$rel"; then + # Uploaded without the store function. Queued again instead (held): read as usual. + say "$rel: not looked up anew (rc $RC, $DROP), not rebound" + else + got=$( (timeout -k 5 "$T" dd if="$MNT/$rel" bs=1 skip="${pos:-0}" count=1 2>/dev/null && echo) | wc -c | tr -cd 0-9) + if [ "${got:-0}" -eq 2 ] || { [ "$size" = 0 ] && [ "${got:-0}" -eq 1 ] && ! leftover "$d/$rel"; }; then + ok=$((ok + 1)) + continue + fi + say "$rel: read failed, not rebound" + fi + fi + printf '%s\n' "$rel" >>"$todo.left" +done <"$todo" + +# The uploads of what was read get their own time back; what is left stays held. +now=$(date +%s) +awk -F'\t' -v left="$todo.left" -v now="$now" -v out="$HELD.left" ' + BEGIN { while ((getline l < left) > 0) keep[l] = 1 } + ($3 in keep) { print > out; next } + { e = $2 - now; print $1 "\t" (e > 0 ? e : 0) }' "$HELD" | while IFS="$(printf '\t')" read -r id e; do + rc "vfs/queue-set-expiry?id=$id&expiry=$e" >/dev/null || say "upload $id: time not given back" +done +if [ -s "$HELD.left" ]; then mv "$HELD.left" "$HELD"; else rm -f "$HELD" "$HELD.left"; fi +# Still to forget: what was or is uploading and was not read. +cat "$FORGET" "$BUSY" 2>/dev/null | sort -u | grep -xF -f "$todo.left" >"$FORGET.new" +if [ -s "$FORGET.new" ]; then mv "$FORGET.new" "$FORGET"; else rm -f "$FORGET" "$FORGET.new"; fi +rm -f "$BUSY" + +n=$(grep -c . "$todo.left" 2>/dev/null) +if [ "$(cat "$PIDF" 2>/dev/null)" != "$pid" ]; then + say "rclone restarted meanwhile: its own rebind decides" +elif ! [ "$n" -ge 0 ] 2>/dev/null; then + # No count is no proof: Samba stays off and the next run rebinds everything. + echo '*' >"$UNBOUND" + n="?" +elif [ "$n" -gt 0 ]; then + mv "$todo.left" "$UNBOUND" +else + rm -f "$UNBOUND" +fi +rm -f "$todo" "$todo.left" +say "rebound $ok dirty file(s) to the VFS before serving, $n left unread$([ "$n" != 0 ] && echo ': Samba stays off, cm-smb-heal retries every minute')" +exit 0 diff --git a/vm/cmsmb.yaml b/vm/cmsmb.yaml index 47c4a31..664fb40 100644 --- a/vm/cmsmb.yaml +++ b/vm/cmsmb.yaml @@ -52,18 +52,14 @@ provision: - mode: data path: /etc/systemd/system/tm-bands-bind.service file: systemd/tm-bands-bind.service -- mode: data - path: /usr/local/sbin/tm-bundle - file: tm-bundle.sh - permissions: 755 - mode: data path: /etc/systemd/system/smbd.service.d/cloudmachine.conf file: systemd/smbd.service.d/cloudmachine.conf - mode: data path: /etc/systemd/system/smbd.service.d/limits.conf file: systemd/smbd.service.d/limits.conf -# punchfs.c, passthrough_helpers.h and test-punchfs.sh as ONE compressed archive -# (vm/punchfs/pack.sh): Lima's `list --json` breaks past 64 KiB of embedded files. +# punchfs.c, passthrough_helpers.h, test-punchfs.sh, tm-bundle.sh and cm-vfs-guard.sh as ONE +# compressed archive (vm/punchfs/pack.sh): Lima's `list --json` breaks past 64 KiB of embedded files. - mode: data path: /opt/cloudmachine/punchfs/src.tar.gz.b64 file: punchfs/src.tar.gz.b64 @@ -138,6 +134,8 @@ provision: # 5. punchfs, rebuilt only when its source changed. The sources arrive as # one archive (see the `file:` entry above); unpack it first. base64 -d /opt/cloudmachine/punchfs/src.tar.gz.b64 | tar -xz --no-same-owner -C /opt/cloudmachine/punchfs + install -m 755 /opt/cloudmachine/punchfs/tm-bundle.sh /usr/local/sbin/tm-bundle + install -m 755 /opt/cloudmachine/punchfs/cm-vfs-guard.sh /usr/local/sbin/cm-vfs-guard src=/opt/cloudmachine/punchfs/punchfs.c built=/var/lib/cloudmachine/punchfs.built.c if [ ! -x /usr/local/bin/punchfs ] || ! cmp -s "$src" "$built"; then diff --git a/vm/punchfs/pack.sh b/vm/punchfs/pack.sh index e65f50b..ba9b9c0 100755 --- a/vm/punchfs/pack.sh +++ b/vm/punchfs/pack.sh @@ -6,9 +6,12 @@ # long") once that JSON passes 64 KiB, which blinds vm-status, vm-guard, # backup-health and vm-hold. The sources are most of it, so they ship as one # compressed archive that the machine's provisioning unpacks into -# /opt/cloudmachine/punchfs/ before it builds. A test keeps the archive equal +# /opt/cloudmachine/punchfs/ before it builds; tm-bundle.sh and cm-vfs-guard.sh +# (vm/) ride along and are installed from there. A test keeps the archive equal # to the files: run this after changing any of them. set -euo pipefail cd "$(dirname "$0")" -COPYFILE_DISABLE=1 tar --no-xattrs -cz punchfs.c passthrough_helpers.h test-punchfs.sh | base64 > src.tar.gz.b64 +# gzip, not `tar -z`: bsdtar pads its compressed output to 10 KiB blocks (13 KiB of base64). +COPYFILE_DISABLE=1 tar --no-xattrs -c punchfs.c passthrough_helpers.h test-punchfs.sh \ + -C .. tm-bundle.sh cm-vfs-guard.sh | gzip -9n | base64 > src.tar.gz.b64 echo "src.tar.gz.b64: $(wc -c < src.tar.gz.b64) bytes" diff --git a/vm/punchfs/src.tar.gz.b64 b/vm/punchfs/src.tar.gz.b64 index feac1b9..91a1ce9 100644 --- a/vm/punchfs/src.tar.gz.b64 +++ b/vm/punchfs/src.tar.gz.b64 @@ -1 +1 @@ -H4sIAMGS9WoAA+19bVsbR7Lo+Yp+RVu2QcJ6xS/JBYs9MghHTwBxEcTJtX2VQRqhWSSNdmYEZhOf337rrXt6RiMknOzus89d4oDU011dXV1VXdVdXTObT/ujYVjp/9c/7qdWq7159Urh3+/evKa/tR3+XqvV669ewsP6653vXr+s116+eqNq9Vc7O2/+S9X+gTiZn3kYOQGgMrly+3+/n4Y3XnY9qDYcPgCHBlNT5u+/yU91O6fU0WW3tauOvLEb3oeRO1HeVF2GbhDOnL4Lzw/82X3gXY8iVTgoqh2YtDL8+k6pE+9m7Ieq+3c3cAeeejuh7/8d8vfKaL6fg+YXIy9Us8C/DpyJ6jtTdeWqgRdGgXc1j9yBmk8HbqCikasiN5iEyh/Sl/enl+r92fHtTgVgdF2XCoeApDronP3SPn1fyW1XczkawYzZeFeNvavhPHTVy0r9VaWm3C/OZDZ2qzMnDKNR4M+vR73xuNIvqYk/8IYe9D70A3Uw9ueDE6c/8qY43sK5O3UO/IFbREp0+pF/BQju1HbeVNTByJleuwPoye8NnfHY7zsRoAWfQnXl9G9U5Ku7wIu86TVAAkL4YUk50wFh736JXBjsoOxEMnqgB7a8cd2ZMoUhdht6Ax5uiON/50cj1ae+Q0AZ+r1Tjur7k4k7jRTyMPao8vZIdvN76rzVPDxpVSYDBBnBRACsgRe4MKbgXoXOfajuRveaktvqv7HHnAKabvO8EcGFLSZeEPhBKEOBGcQu7Qojzw2coD+6lzlEKPyoFOPoRAQg8P3Iblzh/vAfThmOC2bn6h5h/BWkVOVxEhGATGReAelU4P5t7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D9XRG1fyMtUDvUsq1/Ll74pW1P8mPZo9xXhFS0yqMyluDRNfMY2m3qAySxpeoFK7qiLsSoo2mtyZqWFNDrqYF0ZXFfUV0eUr9QZgA3l0vs29/WMZ5vMIk2xizk305oQRe3N09s0MOZGlXVx6urhUznKFiaP8AigwJDwEtaK9L/gKeY9P2xlvUbp0XQsqaydAmHJN3aUGQ6kQ0+wXwysrrHMmVYDSEWUpIrNTn65zz6Emx70GOWYDUW09LaTJinunTTPxFmgvOMzdG7PaYKO4Y5v2YUioyE1+5Mes8US2yPbSabyE+ggWb9r4zNopwAVilkgJtE3us0ywlJgYaNiJZUKqX3FxFcUoPk4U0nVswlJHWbVcXKH7XG7WpNRinUwUVfQRNGiGPl4G7Kq7pVy9xrFONsRLsJAkeo7SQcWP1XP8B5UcGgiKtw3wpjMcEh5ZcaNEKkVBfa6P4lOt59IROc2X9TUlBSnO8blq07UmsKDyHncj4ZWQvEZGVyRj9kbHhwMhKgXWf+9VSOh8J941oMUeSr2+SnGL0ZxZIUl6az1Nd9d+YRDI9DhByypNndYlWEsqjDLat4VZyvWsFYv5br5nOb5l2+GbeHgxGSLxWcP4K8SZ1PO7Qc+n4+8UWY1NjliFQYmVt7DhvSUsMdnNh9pn2G/M+Mz0eXSaJKgRc5MRB1xJpvG5ntNR0/lRsDI4xcn5UnQWX6epZ1WXxUFT3jy3RoN9GCmxxrRjsagWQcgmu4V4DlVOgmFAoniWJBgRVqkRCzFW1xeLgnGyScCdnKFRyY5EI+ciRgLaAWkgBgria3w6Jvr0efo8fZ4+T5+nz9Pn6fP0efo8fZ4+T5+nz9Pn6fP0efo8fZ4+T5+nz9Pn6fP0efo8fZ4+T5+nz9Pn6fP0efo8fZ4+T5+nz9Pn/6LP/wFYYR1xAEABAA== diff --git a/vm/systemd/cm-smb-heal.service b/vm/systemd/cm-smb-heal.service index efb8bb8..999e294 100644 --- a/vm/systemd/cm-smb-heal.service +++ b/vm/systemd/cm-smb-heal.service @@ -1,6 +1,7 @@ [Unit] Description=Heal: bind and Samba back up after a restart of the chain [Service] -TimeoutStartSec=30 +# 90: a retry of unread bands (cm-vfs-guard, 30 s + one stuck read) fits. +TimeoutStartSec=90 Type=oneshot ExecStart=/usr/local/sbin/cm-smb-heal diff --git a/vm/systemd/punchfs.service b/vm/systemd/punchfs.service index 0690696..ed710d8 100644 --- a/vm/systemd/punchfs.service +++ b/vm/systemd/punchfs.service @@ -10,6 +10,11 @@ ConditionPathExists=/etc/rclone/rclone.conf [Service] Type=simple ExecStartPre=-/usr/local/sbin/cm-unmount-stale --bands --own /srv/tm-punch +# Zeros after an rclone restart (vm/README.md): before anything opens a band. Here, as +# rclone-tm may not chain anything after its start (VMLayoutTests). Reads stop at 900 s. +EnvironmentFile=-/etc/cloudmachine/vm.env +TimeoutStartSec=20min +ExecStartPre=-/usr/local/sbin/cm-vfs-guard rebind # One descriptor per inode seen: the default 1024 ran out (EMFILE). LimitNOFILE=524288 # syncfs=: fsync also syncfs()es rclone's --cache-dir (vfsMeta is written without fsync). diff --git a/vm/systemd/rclone-tm.service b/vm/systemd/rclone-tm.service index 29642cf..b936110 100644 --- a/vm/systemd/rclone-tm.service +++ b/vm/systemd/rclone-tm.service @@ -27,6 +27,8 @@ ExecStart=/usr/local/bin/rclone mount2 ${CM_REMOTE} /srv/tm \ --use-mmap --buffer-size 8M --transfers 4 --drive-chunk-size 32M --drive-use-trash=true --drive-stop-on-upload-limit \ --rc --rc-addr 127.0.0.1:5572 --rc-no-auth --log-file /var/log/rclone-tm.log --log-level INFO ExecStartPre=-/usr/local/sbin/cm-unmount-stale --bands /srv/tm-punch --own /srv/tm +# Zeros after a restart (vm/README.md): repair here, rebind in punchfs.service. +ExecStartPre=-/usr/local/sbin/cm-vfs-guard repair ExecStop=/usr/local/sbin/cm-unmount-stale --own /srv/tm Restart=always RestartSec=10 diff --git a/vm/systemd/smbd.service.d/cloudmachine.conf b/vm/systemd/smbd.service.d/cloudmachine.conf index d7dd29f..baae708 100644 --- a/vm/systemd/smbd.service.d/cloudmachine.conf +++ b/vm/systemd/smbd.service.d/cloudmachine.conf @@ -5,5 +5,7 @@ Requires=rclone-tm.service punchfs.service tm-bands-bind.service After=rclone-tm.service punchfs.service tm-bands-bind.service ConditionPathExists=/etc/rclone/rclone.conf ConditionPathExists=!/var/lib/cloudmachine/smbd-attention +# Bands an rclone restart left unread (cm-vfs-guard): served now, they may turn to zeros. +ConditionPathExists=!/run/cloudmachine/vfs-unbound [Service] ExecStartPost=-/bin/rm -f /run/cloudmachine-smbd-hold diff --git a/vm/tests/vfs-restart.sh b/vm/tests/vfs-restart.sh new file mode 100644 index 0000000..7ec92ba --- /dev/null +++ b/vm/tests/vfs-restart.sh @@ -0,0 +1,104 @@ +#!/bin/sh +# Live check of the 30.11.2026 fix (vm/README.md, "Bands read as zeros after an rclone +# restart"), run INSIDE a TEST machine (never the only copy of a backup): +# limactl shell --workdir / cmtest sudo sh vfs-restart.sh [kill9|restart|repair] [rounds] +# kill9/restart: each round writes a NEW 32 MiB file (not yet on Drive) in a folder rclone +# has already listed, restarts rclone before the write-back, waits for the chain to come +# back (punchfs runs `cm-vfs-guard rebind` before it starts), lists the folder again (what +# smbd does), uploads the file at once and reads it back through the mount. Before the fix +# the read gave 0 bytes ("removed cache file as stale (remote deleted)") while Drive had the +# file; with the fix it must equal Drive every round. +# repair: each round uploads a file, stops rclone, leaves the cache entry exactly as the bug +# does (clean, empty, no fingerprint, 0-byte data file), starts rclone again and reads the +# file through the mount: `cm-vfs-guard repair` (rclone-tm ExecStartPre) must make it equal +# Drive again. Without the fix it reads 0 bytes. +# With a Time Machine client (image attached, kill -9 during a backup, next backup, fsck_apfs +# on the client) the check needs a client machine next to this one: it is run from the Mac +# with a tart VM as the client (30.11.2026 campaign, vm/README.md table), not from here. +set -eu +MODE="${1:-kill9}" +ROUNDS="${2:-3}" +# shellcheck source=/dev/null +. /etc/cloudmachine/vm.env +R="rclone --config /etc/rclone/rclone.conf" +RCA=127.0.0.1:5572 +D=/srv/tm/_cmtest/vfs-restart +fail=0 +mkdir -p "$D" +ls "$D" >/dev/null + +upload() { # name: force the write-back now, wait until it is done + id=$(curl -s -X POST "$RCA/vfs/queue" | python3 -c "import json,sys +q=json.load(sys.stdin).get('queue') or [] +print(next((x['id'] for x in q if x['name'].endswith('/$1')), ''))") + [ -n "$id" ] && curl -s -X POST "$RCA/vfs/queue-set-expiry" -H 'Content-Type: application/json' \ + -d "{\"id\":$id,\"expiry\":0}" >/dev/null + n=0 + while curl -s -X POST "$RCA/vfs/queue" | grep -q "$1"; do + n=$((n + 1)); [ "$n" -lt 300 ] || { echo "FAIL: upload did not finish"; exit 1; }; sleep 1 + done + sleep 2 +} +# punchfs restarted (new main process) and active: rebind has run, as before smbd. +wait_chain() { # old punchfs MainPID + n=0 + until systemctl is-active -q rclone-tm && mountpoint -q /srv/tm \ + && systemctl is-active -q punchfs \ + && [ "$(systemctl show -p MainPID --value punchfs)" != "$1" ]; do + n=$((n + 1)); [ "$n" -lt 1200 ] || { echo "FAIL: rclone-tm/punchfs not back"; exit 1; }; sleep 1 + done +} +# The cache entry (meta) of a file under the remote, in / or {hash}/. +meta_of() { + name=${CM_REMOTE%%:*}; sub=${CM_REMOTE#*:}; sub=${sub#/}; sub=${sub%/} + for m in /var/cache/rclone/vfsMeta/"$name"/"$sub"/"$1" "/var/cache/rclone/vfsMeta/$name{"*"}/$sub/$1"; do + [ -f "$m" ] && { printf '%s\n' "$m"; return 0; } + done + return 1 +} + +i=0 +while [ "$i" -lt "$ROUNDS" ]; do + i=$((i + 1)) + b="band-$$-$i" + f="$D/$b" + head -c 33554432 /dev/urandom >"$f" + want=$(md5sum <"$f" | cut -c1-32) + case "$MODE" in + repair) + upload "$b" + up=$(systemctl list-units --state=active --plain --no-legend punchfs.service tm-bands-bind.service smbd.service | cut -d' ' -f1) + systemctl stop rclone-tm + m=$(meta_of "_cmtest/vfs-restart/$b") || { echo "FAIL: no cache entry for $b"; exit 1; } + printf '{\n\t"ModTime": "2026-11-30T11:14:05.657547647+01:00",\n\t"ATime": "2026-11-30T11:14:05.657547647+01:00",\n\t"Size": 0,\n\t"Rs": null,\n\t"Fingerprint": "",\n\t"Dirty": false\n}\n' >"$m" + : >"/var/cache/rclone/vfs/${m#/var/cache/rclone/vfsMeta/}" + systemctl start rclone-tm + # shellcheck disable=SC2086 # unit names, no spaces + [ -z "$up" ] || systemctl start $up + ;; + restart | kill9) + old=$(systemctl show -p MainPID --value punchfs) + if [ "$MODE" = restart ]; then + systemctl restart rclone-tm + else + pid=$(systemctl show -p MainPID --value rclone-tm) + [ "${pid:-0}" -gt 0 ] || { echo "FAIL: rclone-tm has no main process"; exit 1; } + kill -9 "$pid" + sleep 2 + fi + wait_chain "$old" + ls "$D" >/dev/null + upload "$b" + ;; + *) echo "usage: vfs-restart.sh [kill9|restart|repair] [rounds]"; exit 2 ;; + esac + got=$(md5sum <"$f" | cut -c1-32) + drive=$($R md5sum "$CM_REMOTE/_cmtest/vfs-restart/$b" | cut -c1-32) + if [ "$got" = "$want" ] && [ "$drive" = "$want" ]; then + echo "round $i ($MODE): OK" + else + echo "round $i ($MODE): FAIL written=$want mount=$got drive=$drive"; fail=1 + fi + rm -f "$f" +done +if [ "$fail" = 0 ]; then echo "PASS: $ROUNDS rounds"; else echo "FAIL"; exit 1; fi