Hear what providers retire, and let a person approve, reject and delete (hq ADR 0230)
A provider now waits for a person before retiring more than three consumers or half of what it holds, and deletes only when asked. The controller is that person's way in: it keeps waiting and rejected sets as conditions, answers them with retire approve|reject, lists and deletes retired consumers through the provider's own tools on its machine, records each act in the hand-act log, and probes for anything retired longer than thirty days (D11).
This commit is contained in:
@@ -66,6 +66,10 @@ type signalFacts struct {
|
||||
|
||||
standings []conditions.Condition
|
||||
standingsErr error
|
||||
// providerWords are every open condition a provider's word raised — failing, waiting for a person
|
||||
// to approve a retirement, kept by a rejection, cleanup waiting (ADR 0224, 0230) — so a provider no
|
||||
// longer assigned has them all cleared.
|
||||
providerWords []conditions.Condition
|
||||
|
||||
advisories []link.Advisory
|
||||
lostConsumers map[string]bool
|
||||
@@ -228,7 +232,7 @@ func (w *watchdogs) see(running context.Context, f *signalFacts) {
|
||||
}
|
||||
// A provider no longer assigned where it ran: its standing is resolved by the assignment.
|
||||
if f.standingsErr == nil && w.open != nil {
|
||||
if err := unassignedProviders(running, w.open.inventory, w.keeper, f.standings); err != nil {
|
||||
if err := unassignedProviders(running, w.open.inventory, w.keeper, f.providerWords); err != nil {
|
||||
problems = append(problems, "S8: "+err.Error())
|
||||
}
|
||||
}
|
||||
@@ -297,6 +301,7 @@ func (w *watchdogs) gather(ctx context.Context) *signalFacts {
|
||||
f.standingsErr = err
|
||||
} else {
|
||||
f.standings = providerStandings(open)
|
||||
f.providerWords = providerConditions(open)
|
||||
}
|
||||
f.advisories = link.Advisories.Since(now.Add(-advisoryQuiet))
|
||||
f.lostConsumers, f.advisoriesErr = w.lostConsumers(ctx, f.advisories)
|
||||
|
||||
Reference in New Issue
Block a user