A node's own readiness and its multi-node readiness are kept apart
doctor sums findings up as two readinesses - the node's, which decides whether it joins, and multi-node, its fabrics for replicas spanning nodes - prints fabric findings in a section of their own, and gives both in --json. node add says the multi-node one. NodeView.multi_node says whether a node's declared fabrics are up, naming adapters that are down, and ctl nodes shows it beside the fabric. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5ae870e1b2
commit
f2b2e24e1f
8 files changed
+155
-10
No files matched your search
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/control/catalog"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/control/inventory"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/guard"
|
||||
)
|
||||
|
||||
@@ -104,3 +105,21 @@ func TestANodeSaysItsEnginesVersionsAndCapabilities(t *testing.T) {
|
||||
t.Errorf("%+v", nodes)
|
||||
}
|
||||
}
|
||||
|
||||
func TestANodeSaysWhetherItsFabricsAreUp(t *testing.T) {
|
||||
n := gpuNode("ib1", 2, "ib-a")
|
||||
if got := multiNodeReadiness(n); !strings.HasPrefix(got, "unknown") {
|
||||
t.Errorf("no port yet: %q", got)
|
||||
}
|
||||
n.IBPorts = []inventory.IBPort{{HCA: "mlx5_0", State: "DOWN"}}
|
||||
if got := multiNodeReadiness(n); got != "down: mlx5_0" {
|
||||
t.Errorf("down: %q", got)
|
||||
}
|
||||
n.IBPorts[0].State = "ACTIVE"
|
||||
if got := multiNodeReadiness(n); got != "ready" {
|
||||
t.Errorf("up: %q", got)
|
||||
}
|
||||
if got := multiNodeReadiness(gpuNode("plain", 1)); got != "" {
|
||||
t.Errorf("no fabric: %q", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user