feat(releaseupdate): transactional self-update through archied (#1633)
archied update install verifies the release zip, checks every binary reports the release, pulls the agent image by digest, backs up the database in-process and stages the binaries before handing off to archied update watchdog in its own process. The watchdog restarts units in release order, requires archied healthy for 120s and otherwise rolls back binaries and image policy, restoring the database only when a migration ran. Boot recovery resumes the frozen watchdog. Deletes scripts/archie-update-install, scripts/archie-update-watchdog, the updater's --from-source and --auto, CommandInstaller, ScriptInstaller and the update-image and update-topology subcommands.
This commit is contained in:
1 parent
23f87c4cea
commit
417d379ede
33 files changed
+1754
-1114
No files matched your search
@@ -41,8 +41,7 @@ const (
|
||||
defaultCaptureRatePerSecond = 1.0
|
||||
defaultCaptureRateBurst = 5
|
||||
|
||||
// defaultHealthListen is the daemon's own liveness address. The update
|
||||
// watchdog's fallback in scripts/archie-update-watchdog must match it.
|
||||
// defaultHealthListen is the daemon's own liveness address.
|
||||
defaultHealthListen = "127.0.0.1:8485"
|
||||
|
||||
// defaultHealthDependencyTimeout matches the extracted services'
|
||||
|
||||
@@ -118,12 +118,12 @@ type UpdateSettings struct {
|
||||
}
|
||||
|
||||
// UpdateService checks GitHub on the stored release channel and installs
|
||||
// through the script beside this binary. statePath keeps each recipient's
|
||||
// deferrals; healthURL reaches the installer.
|
||||
func UpdateService(reader ResourceReader, statePath, healthURL string) *releaseupdate.Service {
|
||||
// through the archied beside this binary. statePath keeps each recipient's
|
||||
// deferrals.
|
||||
func UpdateService(reader ResourceReader, statePath string) *releaseupdate.Service {
|
||||
return &releaseupdate.Service{
|
||||
Catalog: &releaseupdate.GitHubCatalog{Channel: updateChannel(reader)},
|
||||
Installer: releaseupdate.ScriptInstaller{HealthURL: healthURL},
|
||||
Installer: releaseupdate.ArchiedInstaller{},
|
||||
StatePath: statePath,
|
||||
InstallType: installtype.Type(),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user