The firewall turns off and on with the cluster's settings; llmgw wipe
firewall.enabled (default true) is a cluster setting, applied live: the leader sends a Firewall message to every agent when it registers and when the setting or firewall_networks changes, and the agent (root) takes llmgw's nft table out or installs it. A control plane writes the state to /var/lib/llmgw/firewall.json, which llmgw-firewall-sync.path applies as root with `llmgw firewall sync`; server init and server add install the units, `llmgw firewall sync --install` on one set up before. node add and server add put no firewall on a machine while the setting is off. `llmgw wipe` removes llmgw from a machine after listing what goes and asking for its name: units, engines' processes, the nft table, /etc/llmgw, /var/lib/llmgw, the agent's state, the sudo grant, the CA from the trust store, keepalived's configuration when llmgw wrote it, and the users. --models, --store (Patroni member, etcd, or the local database) and --all take more. The console has it under Do. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0730d23b77
commit
32c3942040
29 files changed
+1446
-230
No files matched your search
@@ -300,3 +300,27 @@ func TestTheConsoleEditsTheClustersSettingsInTheStore(t *testing.T) {
|
||||
t.Errorf("the cluster's key went into the machine's file:\n%s", b)
|
||||
}
|
||||
}
|
||||
|
||||
func TestTheConsoleWipesOnlyOnTheMachinesName(t *testing.T) {
|
||||
m := newConsoleModel("127.0.0.1:1", filepath.Join(t.TempDir(), "server.yaml"))
|
||||
m.width, m.height, m.loaded = 120, 40, true
|
||||
m.menu = cWipe
|
||||
m.dialog, m.dialogTitle, m.dialogText = "wipe", "Wipe this machine", m.wipeQuestion()
|
||||
m.prompt = newTextField()
|
||||
m.prompt.Focus()
|
||||
if v := m.View(); !strings.Contains(v, "Type the machine's name") {
|
||||
t.Errorf("the dialog does not ask for the name:\n%s", v)
|
||||
}
|
||||
m.prompt.SetValue("not-this-one")
|
||||
mm := press(m, "enter")
|
||||
if a := mm.(consoleModel).action; a.kind != "" {
|
||||
t.Fatalf("a wrong name wiped: %+v", a)
|
||||
}
|
||||
cm := mm.(consoleModel)
|
||||
host, _ := os.Hostname()
|
||||
cm.prompt.SetValue(host)
|
||||
mm = press(cm, "enter")
|
||||
if a := mm.(consoleModel).action; a.kind != "wipe" {
|
||||
t.Errorf("the right name did not: %+v", a)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user