fix(update): concurrent apply reads as progress, not failure; idle-IO extraction
Demo images / Build & push demo images (push) Successful in 5m18s
Demo images / Build & push demo images (push) Successful in 5m18s
"Another update operation is already running" surfaced as a scary failure while the update was in fact applying fine (OptiPlex, v1.7.118 rollout). The apply path now joins the in-flight install — same overlay, same wait-for-new-version polling — and a concurrent download attempt shows a calm in-progress note (EN+ES strings added). The backend's tarball extractions run under ionice -c3 nice -n10 so a 200MB update can't starve podman/status calls into multi-minute timeouts on small disks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
00f1892bf8
commit
49ec294dea
@@ -706,6 +706,8 @@
|
||||
"downloadFailed": "Download failed. Please try again.",
|
||||
"applySuccess": "Update applied. The service will restart momentarily.",
|
||||
"applyFailed": "Failed to apply update. You can try again or rollback.",
|
||||
"applyInProgress": "An update is already being installed — hang tight, the node will restart when it finishes.",
|
||||
"downloadInProgress": "An update download is already in progress — progress will appear above.",
|
||||
"rollbackSuccess": "Rolled back to previous version. Service will restart.",
|
||||
"rollbackFailed": "Rollback failed.",
|
||||
"pullAndRebuild": "Pull & Rebuild",
|
||||
|
||||
@@ -693,6 +693,8 @@
|
||||
"downloadFailed": "La descarga fall\u00f3. Intente de nuevo.",
|
||||
"applySuccess": "Actualizaci\u00f3n aplicada. El servicio se reiniciar\u00e1 en un momento.",
|
||||
"applyFailed": "Error al aplicar la actualizaci\u00f3n. Puede intentar de nuevo o revertir.",
|
||||
"applyInProgress": "Ya se est\u00e1 instalando una actualizaci\u00f3n \u2014 espere, el nodo se reiniciar\u00e1 al terminar.",
|
||||
"downloadInProgress": "Ya hay una descarga de actualizaci\u00f3n en curso \u2014 el progreso aparecer\u00e1 arriba.",
|
||||
"rollbackSuccess": "Se revirti\u00f3 a la versi\u00f3n anterior. El servicio se reiniciar\u00e1.",
|
||||
"rollbackFailed": "Error al revertir.",
|
||||
"pullAndRebuild": "Pull y Recompilar",
|
||||
|
||||
@@ -978,6 +978,11 @@ async function downloadUpdate() {
|
||||
updateInProgress.value = false
|
||||
await loadStatus()
|
||||
showStatus(t('systemUpdate.upToDateMessage'))
|
||||
} else if (/already running/i.test(msg)) {
|
||||
// A download/apply is already in flight (auto-updater or another tab) —
|
||||
// that's progress, not failure. Re-sync state and say so calmly.
|
||||
await loadStatus()
|
||||
showStatus(t('systemUpdate.downloadInProgress'))
|
||||
} else {
|
||||
// A failed download is NOT a staged update — return the UI to the
|
||||
// Download button so the user can retry, instead of stranding them on
|
||||
@@ -1065,6 +1070,20 @@ async function applyUpdate() {
|
||||
setTimeout(() => window.location.reload(), 3000)
|
||||
}
|
||||
} catch (e) {
|
||||
// "Another update operation is already running" is NOT a failure — an
|
||||
// apply (or the auto-updater) is already doing the work. Presenting it
|
||||
// as an error made a successfully-updating node look broken (OptiPlex,
|
||||
// v1.7.118 rollout). Join the in-flight apply instead: same overlay,
|
||||
// same wait-for-new-version polling.
|
||||
if (/already running/i.test(errorMessage(e))) {
|
||||
applying.value = false
|
||||
if (target) {
|
||||
startInstallOverlay(target)
|
||||
} else {
|
||||
showStatus(t('systemUpdate.applyInProgress'))
|
||||
}
|
||||
return
|
||||
}
|
||||
showStatus(t('systemUpdate.applyFailed'), true)
|
||||
if (import.meta.env.DEV) console.warn('Apply failed', e)
|
||||
applying.value = false
|
||||
|
||||
Reference in New Issue
Block a user