R-1288: a restore of a set-aside unit sets the replaced install's unit aside at once, with no alarm. R-1282: the later media restart time is stored and resumed at start, once. Red-proved. Commit only.
gates / gates (push) Successful in 1m26s

This commit is contained in:
admin committed 2026-10-25 21:37:55 +01:00
1 parent a79a292d72
commit b5863a96eb
8 files changed
+274 -13

No files matched your search

@@ -59,9 +59,17 @@ func (f *fakeRecoveryProvider) GetStackClassifiedBinds(string) ([]ClassifiedBind
func (f *fakeRecoveryProvider) RecoverStackSecrets(string, []string) map[string]string {
return f.secrets
}
func (f *fakeRecoveryProvider) RecreateStackDefinitionFromUnit(_, _ string, fullEnv map[string]string) error {
func (f *fakeRecoveryProvider) RecreateStackDefinitionFromUnit(_, composeDir string, fullEnv map[string]string) error {
f.gotEnv = fullEnv
f.calls = append(f.calls, "recreate")
// As the stack manager does (stacks/deploy.go, D47): the restored app takes the unit's install identity.
if b, err := os.ReadFile(filepath.Join(composeDir, "app.yaml")); err == nil {
for _, l := range strings.Split(string(b), "\n") {
if v, ok := strings.CutPrefix(strings.TrimSpace(l), "install_id:"); ok && strings.TrimSpace(v) != "" {
f.info.InstallID = strings.Trim(strings.TrimSpace(v), `"'`)
}
}
}
return nil
}
func (f *fakeRecoveryProvider) StartStackServices(_ string, services []string) error {