hub v0.160.0: a live re-enroll mails the operator (R-1156); further refused backups counted, alarm once a day (R-1157); the reinstall's off-site re-issue says what it still does (R-1158)
This commit is contained in:
1 parent
d5e3c8b0d9
commit
503c93fada
10 files changed
+251
-28
No files matched your search
@@ -25,8 +25,10 @@ import (
|
||||
// controller's report are older than staleThreshold or absent; the hostStatus threshold and comparison):
|
||||
// the operator-only WARNING host_reinstall_over_old_host, mailed to the operator, saying what to do.
|
||||
// - The box is live (a --resume after its agent started, a repair re-run, or a reinstall done within the
|
||||
// threshold of the old box's last report): the operator-only INFO host_reenroll_while_live, recorded on
|
||||
// the event list, never mailed.
|
||||
// threshold of the old box's last report): the operator-only WARNING host_reenroll_while_live, mailed to the
|
||||
// operator with the same instruction (R-1156, hub v0.160.0: a reinstall done within 45 minutes of the old
|
||||
// box's last report reads as live, and was recorded without a mail until then). The cost: a --resume or a
|
||||
// repair re-run mails too — the text says that case needs nothing.
|
||||
//
|
||||
// WHY NOT RE-ISSUE AUTOMATICALLY (security review of the first draft, 2026-10-19): the passphrase is a
|
||||
// household-held secret typed into the installer. Re-issuing a household's off-site credential and
|
||||
@@ -101,10 +103,13 @@ func (h *Handler) noteReenrollOverExistingHost(cc *store.CustomerConfig, host *s
|
||||
"re-issue the claim code and the off-site login from the customer page."
|
||||
h.saveReenrollEvent(cc.CustomerID, eventHostReinstallOverOldHost, "warning", msg, host.HostID, why)
|
||||
case reenrollLive:
|
||||
h.logger.Printf("[INFO] host re-enrolled: %s (customer %s) — the box is live: %s", host.HostID, cc.CustomerID, why)
|
||||
msg := "Host " + host.HostID + " enrolled again while the box is live (" + why + "); nothing was re-issued. " +
|
||||
"If this box was reinstalled, delete the old host and run the installer again, or re-issue from the customer page."
|
||||
h.saveReenrollEvent(cc.CustomerID, eventHostReenrollWhileLive, "info", msg, host.HostID, why)
|
||||
h.logger.Printf("[WARN] host re-enrolled: %s (customer %s) while the box looks live: %s; nothing re-issued, the operator is told",
|
||||
host.HostID, cc.CustomerID, why)
|
||||
msg := "Host " + host.HostID + " of " + cc.CustomerID + " enrolled again while the box looks live (" + why +
|
||||
"); nothing was re-issued. If this box was reinstalled: delete the old host (Hosts page) and run the installer " +
|
||||
"again, or re-issue the claim code and the off-site login from the customer page. If it was an installer " +
|
||||
"--resume or a repair re-run, nothing needs doing."
|
||||
h.saveReenrollEvent(cc.CustomerID, eventHostReenrollWhileLive, "warning", msg, host.HostID, why)
|
||||
default:
|
||||
h.logger.Printf("[WARN] host re-enrolled: %s (customer %s) — not classified: %s", host.HostID, cc.CustomerID, why)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user