Nodes say where they are with llmgw.io/site, room, row, rack and pdu labels, from agent.yaml or `llmgw ctl label` (kept in the store, over the agent's). Placement spreads a model's replicas across racks and PDUs, keeps a multi-node replica within one domain when its profile says keep_within, places nothing in a domain held with `llmgw ctl facility hold` (optionally draining it), and refuses a shard that would take a domain past its power cap from facility.budgets, counting declared, derived and measured draw. Explain-placement names the domain, and keeps the rejections of a placed replica; `ctl nodes` gains LOCATION and --domain; `ctl facility` lists the domains; the console's Nodes view shows and sets location and holds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
25 lines
897 B
SQL
25 lines
897 B
SQL
-- Ported from the SQLite migration of the same number.
|
|
-- Facility-aware placement. Domains held for maintenance: a rack, row, PDU
|
|
-- or other domain taken out of placement by `llmgw ctl facility hold`,
|
|
-- kept until released so a restart does not quietly put work back on a rack
|
|
-- somebody has the doors open on.
|
|
CREATE TABLE facility_holds (
|
|
domain TEXT PRIMARY KEY,
|
|
reason TEXT NOT NULL,
|
|
drain BIGINT NOT NULL,
|
|
held_at BIGINT NOT NULL,
|
|
held_by TEXT NOT NULL
|
|
);
|
|
|
|
-- Node labels set through the control plane (`llmgw ctl label`), laid over
|
|
-- what each node's agent.yaml says: where a node is in the building is
|
|
-- usually known to whoever runs the facility, not to the machine.
|
|
CREATE TABLE node_labels (
|
|
node_id TEXT NOT NULL,
|
|
key TEXT NOT NULL,
|
|
value TEXT NOT NULL,
|
|
updated_at BIGINT NOT NULL,
|
|
updated_by TEXT NOT NULL,
|
|
PRIMARY KEY (node_id, key)
|
|
);
|