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:
@@ -19,7 +19,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"git.novox.be/novox/mesh-catalog/modules/disk-load/diskreadings"
|
||||
assignerclient "git.novox.be/novox/mesh-contracts/placement/go/clients/meshmoduleassignerclient"
|
||||
assignerclient "git.novox.be/novox/mesh-contracts/go/clients/meshmoduleassignerclient"
|
||||
"os"
|
||||
"path"
|
||||
"sort"
|
||||
@@ -46,7 +46,7 @@ type BackupFromBus struct {
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// BackupFrom reads the holder of node-backup on one machine from the placement seat's state of who holds which seat
|
||||
// BackupFrom reads the holder of node-backup on one machine from the assignments seat's state of who holds which seat
|
||||
// (novox/hq ADR 0571 clause 4), and the paths that module keeps data in on that machine from disk-load's readings
|
||||
// (clause 3). A machine whose backup seat nobody holds, and no readings at all, are errors: never an empty list read as
|
||||
// "nothing to fear".
|
||||
|
||||
@@ -172,7 +172,7 @@ func TestAStaleOrUnknownBackupListIsSaidWithItsAge(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// backupHolders is the placement seat's state with one holder of node-backup on one node.
|
||||
// backupHolders is the assignments seat's state with one holder of node-backup on one node.
|
||||
func backupHolders(node, module string) map[string][]byte {
|
||||
return map[string][]byte{"node-backup." + node: []byte(`{"v":1,"seat":"node-backup","scope":"node","node":"` + node +
|
||||
`","holders":[{"module":"` + module + `","node":"` + node + `"}]}`)}
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
mesh "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
|
||||
mesh "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
|
||||
"os"
|
||||
"os/signal"
|
||||
"sort"
|
||||
@@ -130,11 +130,11 @@ const assignerModule = "mesh-delivery-assigner"
|
||||
|
||||
const SeatHoldersTool = assignerModule + ".assigner_read_seat_holders"
|
||||
|
||||
// seats is the picture of the placement seat's state of who holds which seat: asked of the assigner once and followed by
|
||||
// seats is the picture of the assignments seat's state of who holds which seat: asked of the assigner once and followed by
|
||||
// its events, never read from its state (ADR 0615).
|
||||
var seats = &views.Reader{Module: "nfs-server", Findings: meshconditionsclient.FindingWriter{State: stdio.State("findings")}, Acts: meshhandactsclient.Recorder{Ask: stdio.Ask}, Logf: func(f string, a ...any) { fmt.Fprintf(os.Stderr, "nfs-server: "+f+"\n", a...) }}
|
||||
|
||||
// seatHolderKeys is the placement seat's state of who holds which seat, every key.
|
||||
// seatHolderKeys is the assignments seat's state of who holds which seat, every key.
|
||||
func seatHolderKeys() (map[string][]byte, error) {
|
||||
return seats.Values(assignerModule + "." + mesh.StateSeatHolders)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.novox.be/novox/mesh-catalog/modules/disk-load/diskreadings"
|
||||
mesh "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
|
||||
mesh "git.novox.be/novox/mesh-contracts/go/seats/meshmoduleassigner"
|
||||
"os"
|
||||
"regexp"
|
||||
"sort"
|
||||
|
||||
Reference in New Issue
Block a user