diff --git a/src/platform.js b/src/platform.js index aee6aca47..7861fe468 100644 --- a/src/platform.js +++ b/src/platform.js @@ -171,13 +171,14 @@ async function startInfra(restoreOptions) { for (let attempt = 0; attempt < 5; attempt++) { try { + await markApps(existingInfra, restoreOptions); // mark app state before we start addons. this gives the db import logic a chance to mark an app as errored + gStatusMessage = 'Updating platform, this can take a while'; if (existingInfra.version !== infra.version) { gStatusMessage = 'Removing containers for upgrade'; await removeAllContainers(); await createDockerNetwork(); } if (existingInfra.version === 'none') await volumes.mountAll(); // when restoring, mount all volumes - await markApps(existingInfra, restoreOptions); // mark app state before we start addons. this gives the db import logic a chance to mark an app as errored gStatusMessage = 'Starting services, this can take a while'; await services.startServices(existingInfra); await fs.promises.writeFile(paths.INFRA_VERSION_FILE, JSON.stringify(infra, null, 4));