hub v0.147.0 (code): the operator's answers S4, S6, S10, S29, S30, S32, S33
gates / gates (push) Successful in 6m0s
gates / gates (push) Successful in 6m0s
- S4 / R-242: GoldenVouchChecker - a published golden unvouched for 2 h raises golden_not_vouched (operator only) - S6 / R-244: the delete cascade de-references app_log_issues; one-time sweep flag -sweep-app-log-residue=count|apply - S10 / R-266: read_failed storage entry shows "read failed", not 0 % - S29 / R-250: host-key scan IPv4 first, ~2 min ladder, "safe to press Save again" error - S30 / R-246: stale_at retired (reader, setter, badge) - S32 / R-521: storage_reconnected ends the storage_disconnected cooldown on both channels - S33 / R-402: host page "Last full check (off-site)" line; two wire-gate allowlist entries removed Each with a test seen failing first. Not built or deployed yet (operator-attended deploy). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
c9b9432986
commit
655f5f66f8
25 files changed
+869
-121
No files matched your search
+41
-3
@@ -140,6 +140,7 @@ func main() {
|
||||
// R-879 roll-back: open the sealed box secrets back to plaintext so a pre-R-879 hub (<= 0.137.0)
|
||||
// can run on this database, then exit. Same -config and OFFSITE_SECRET_KEY as the server.
|
||||
unsealBox := flag.Bool("unseal-box-secrets", false, "R-879 roll-back: unseal box API keys, passphrases and PBS tokens to plaintext, then exit")
|
||||
sweepAppLog := flag.String("sweep-app-log-residue", "", "R-244 one-time sweep of DELETED customers' ids in app_log_issues: \"count\" (changes nothing) or \"apply\", then exit")
|
||||
flag.Parse()
|
||||
|
||||
if *showVersion {
|
||||
@@ -197,6 +198,27 @@ func main() {
|
||||
dataStore.Close()
|
||||
os.Exit(code)
|
||||
}
|
||||
if *sweepAppLog != "" {
|
||||
// R-244 (S6, decision 201): the operator sees the count first ("count"), then says yes ("apply").
|
||||
// Only ids the hub no longer knows by config, host or report are touched. Prints ids and counts only.
|
||||
if *sweepAppLog != "count" && *sweepAppLog != "apply" {
|
||||
fmt.Fprintln(os.Stderr, `-sweep-app-log-residue takes "count" or "apply"`)
|
||||
os.Exit(2)
|
||||
}
|
||||
res, err := dataStore.SweepDeletedAppIssueRefs(*sweepAppLog == "apply")
|
||||
dataStore.Close()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "sweep failed (nothing committed): %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
totDer, totDel := 0, 0
|
||||
for _, r := range res {
|
||||
fmt.Printf("%s\tdereferenced=%d\tdeleted=%d\n", r.CustomerID, r.Dereferenced, r.Deleted)
|
||||
totDer, totDel = totDer+r.Dereferenced, totDel+r.Deleted
|
||||
}
|
||||
fmt.Printf("%s: %d deleted customer id(s), %d shared row(s) de-referenced, %d orphan row(s) deleted\n", *sweepAppLog, len(res), totDer, totDel)
|
||||
os.Exit(0)
|
||||
}
|
||||
offsiteKeyReady := false
|
||||
if v := os.Getenv("OFFSITE_SECRET_KEY"); v == "" {
|
||||
logger.Printf("[ERROR] OFFSITE_SECRET_KEY unset — off-site passwords cannot be sealed; provisioning and the key registrar are DISABLED")
|
||||
@@ -355,12 +377,13 @@ func main() {
|
||||
webServer.SetAssetManager(assetsMgr)
|
||||
// MAIL-HOLD banner on every operator page + the release button on Configuration.
|
||||
webServer.SetMailHold(mailHold)
|
||||
webServer.SetClaimEngine(claimEngine) // v0.50.0 — Setup-tab claim chip + resend button
|
||||
webServer.SetSelfBindMailer(dispatcher) // v0.66.0 (R-27) — customer self-bind link button (sibling of claim mailer)
|
||||
webServer.SetClaimEngine(claimEngine) // v0.50.0 — Setup-tab claim chip + resend button
|
||||
webServer.SetSelfBindMailer(dispatcher) // v0.66.0 (R-27) — customer self-bind link button (sibling of claim mailer)
|
||||
webServer.SetEventEmitter(dispatcher.ProcessEvent) // v0.135.0 (R-604) — the "floor raise skipped boxes" mail
|
||||
// Day-0 artifact version dropdowns: let the operator pick a version and have the hub derive the
|
||||
// sha256 from Gitea (no hand-copied checksums). Reuses the registry creds; degrades to manual text
|
||||
// entry when they're absent.
|
||||
var giteaClient *gitea.Client // also read by the golden-vouch checker (R-242); nil without registry creds
|
||||
if cfg.Registry.Username != "" && cfg.Registry.Token != "" {
|
||||
// IN-CLUSTER, not the public ingress (v0.100.0). The hub and Gitea share this cluster, and
|
||||
// every one of these is a small metadata call made dozens of times per Configuration page
|
||||
@@ -377,7 +400,8 @@ func main() {
|
||||
if giteaAPI == "" {
|
||||
giteaAPI = "http://gitea.gitea-system.svc.cluster.local:3000"
|
||||
}
|
||||
webServer.SetGiteaClient(gitea.New(giteaAPI, "admin", cfg.Registry.Username, cfg.Registry.Token))
|
||||
giteaClient = gitea.New(giteaAPI, "admin", cfg.Registry.Username, cfg.Registry.Token)
|
||||
webServer.SetGiteaClient(giteaClient)
|
||||
logger.Printf("[INFO] Gitea artifact browser enabled (Day-0 version dropdowns) via %s", giteaAPI)
|
||||
}
|
||||
|
||||
@@ -851,6 +875,17 @@ func main() {
|
||||
// R-523: the agent's in-guest controller supervisor → controller_restarted_by_agent / controller_crashloop.
|
||||
controllerSupervisorChecker := monitor.NewControllerSupervisorChecker(dataStore, dispatcher.ProcessEvent, logger)
|
||||
offsiteDeliveryChecker := monitor.NewOffsiteDeliveryChecker(dataStore, offsiteHealReissuer, dispatcher.ProcessEvent, logger)
|
||||
// R-242 second half (S4, decision 199): published golden vs vouched golden. Needs the registry creds
|
||||
// (the same Gitea client as the Day-0 dropdowns); without them the check is off and says so.
|
||||
var goldenVouchChecker *monitor.GoldenVouchChecker
|
||||
if giteaClient != nil {
|
||||
goldenVouchChecker = monitor.NewGoldenVouchChecker(
|
||||
func(c context.Context) ([]string, error) { return giteaClient.ListVersions(c, "felhom-golden") },
|
||||
func() string { return dataStore.GetArtifactManifest().GoldenVersion },
|
||||
dispatcher.ProcessEvent, logger)
|
||||
} else {
|
||||
logger.Printf("[WARN] Golden vouch check OFF: no registry credentials, so the hub cannot list published goldens")
|
||||
}
|
||||
go func() {
|
||||
ticker := time.NewTicker(60 * time.Second)
|
||||
defer ticker.Stop()
|
||||
@@ -871,6 +906,9 @@ func main() {
|
||||
restoreTestChecker.Check() // R-85: restore-test failure + per-tier staleness
|
||||
offsiteDeliveryChecker.Check()
|
||||
controllerSupervisorChecker.Check()
|
||||
if goldenVouchChecker != nil {
|
||||
goldenVouchChecker.Check() // R-242: throttled to one Gitea listing per 15 min
|
||||
}
|
||||
if offsiteBoxChecker != nil {
|
||||
offsiteBoxChecker.Check() // R-5: restic pool-box aggregate (fetch-throttled internally)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user