Every module follows the assigner's new places: the contracts' go/ path, mesh-wants in the delivery contracts, the state and tool assignments (issue 1966)
The legacy key form placement.<node> is gone from the client, so the readers and their fixtures lose it. The check noplacement now also refuses the assigner's retired names in a manifest. Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -16,7 +16,7 @@ package main
|
||||
// `node-account-confirm` is the node-engine's, dialled as the new login, which the runtime proves: the old login's hash
|
||||
// is then removed, and `rotation-done` is said once the loaded list lacks it, when the old value is dropped and the
|
||||
// rotating part of the key cleared. `abandon` drops the new login and its value before the confirmation and keeps the
|
||||
// old hash. A key whose node leaves the placement is deleted.
|
||||
// old hash. A key whose node leaves the assignments is deleted.
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
@@ -633,13 +633,13 @@ func (v *Vault) RotationState() RotationState {
|
||||
return RotationState{Rotating: append([]NodeLogin{}, running...), Queued: append([]queuedRotation{}, v.nr.queue...)}
|
||||
}
|
||||
|
||||
// LoginsPass deletes the key of every node that left the placement (ADR 0583 §1 insight). A placement that cannot be
|
||||
// LoginsPass deletes the key of every node that left the assignments (ADR 0583 §1 insight). An assignment that cannot be
|
||||
// read, or holds no node, deletes nothing.
|
||||
func (v *Vault) LoginsPass() {
|
||||
if v.Logins == nil || v.Placement.Keys == nil {
|
||||
if v.Logins == nil || v.Assigner.Keys == nil {
|
||||
return
|
||||
}
|
||||
placed, err := v.placements()
|
||||
placed, err := v.assignments()
|
||||
if err != nil || len(placed) == 0 {
|
||||
return
|
||||
}
|
||||
@@ -654,9 +654,9 @@ func (v *Vault) LoginsPass() {
|
||||
}
|
||||
}
|
||||
|
||||
// NodeLeft is heard when a node's key of the placement is deleted: its key of node-logins goes with it.
|
||||
// NodeLeft is heard when a node's key of the assignments is deleted: its key of node-logins goes with it.
|
||||
func (v *Vault) NodeLeft(node string) {
|
||||
if v.Logins == nil || v.Placement.Read == nil {
|
||||
if v.Logins == nil || v.Assigner.Read == nil {
|
||||
return
|
||||
}
|
||||
if _, _, found, err := v.nodePlaced(node); err != nil || found {
|
||||
@@ -667,8 +667,8 @@ func (v *Vault) NodeLeft(node string) {
|
||||
|
||||
func (v *Vault) nodeLeft(node string) {
|
||||
if err := v.Logins.Delete(node); err != nil {
|
||||
v.log("%s left the placement, and its key of %s could not be deleted: %v", node, NodeLoginsState, err)
|
||||
v.log("%s left the assignments, and its key of %s could not be deleted: %v", node, NodeLoginsState, err)
|
||||
return
|
||||
}
|
||||
v.log("%s left the placement: its key of %s is deleted", node, NodeLoginsState)
|
||||
v.log("%s left the assignments: its key of %s is deleted", node, NodeLoginsState)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user