Everything in server.yaml that is not one machine's own is now a versioned document in the store (cluster_settings), the same on every control plane. The first start against a store imports the file's cluster keys, with the baseline guard policy when there is none; after that those keys in a file are ignored, with a warning. Each control plane polls the document's version and its own server.yaml's hash. A change is validated and applied: guard live (Gate.Replace), anything else by a graceful restart that systemd brings back, standbys first and the leader 30s later. A version that does not load on a machine is not applied; at start the newest one that loads is used, so a bad edit cannot keep every control plane down. llmgw ctl config show/get/set/unset/edit/history/rollback, the admin API under /api/v1/settings, and the console's Settings screen, which layers the store's document over the machine's file, write it. Commands beside the control plane that read cluster keys (init, node add, server add, backup, upgrade) read the layered configuration; init --bundle writes offline to the store once it holds the settings. A standby that becomes the leader re-reads models, engine choices and facility holds from the store. Retires appendGuardIfMissing: the import does it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
14 lines
621 B
SQL
14 lines
621 B
SQL
-- The cluster's settings: everything in server.yaml that is not one
|
|
-- machine's own (listeners, certificates, the store's address), as a YAML
|
|
-- document every control plane reads and follows. Each change is a new row,
|
|
-- so what was in force before is there to compare with and go back to, and
|
|
-- two edits made at once cannot both win: the second is refused for naming
|
|
-- a version that is no longer the newest.
|
|
CREATE TABLE cluster_settings (
|
|
version INTEGER PRIMARY KEY,
|
|
body TEXT NOT NULL,
|
|
note TEXT NOT NULL DEFAULT '',
|
|
created_at INTEGER NOT NULL,
|
|
created_by TEXT NOT NULL DEFAULT ''
|
|
);
|