The firewall setting reaches the mirror machine and the store's members

The leading control plane tells the mirror over its API (PUT /v1/firewall,
kept as .firewall.json beside the models and applied by the same path unit
control planes use), and keeps the state in the store's cluster_state for
members that run no llmgw, which a root timer reads from the member's own
copy. The mirror also lets in the network of every node and control plane
the leader knows. Tried on the PoC: off, on and a network added, on every
kind of machine.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-09 08:53:17 +02:00
1 parent 5be3da505b
commit 8df78a4d41
20 files changed
+772 -34

No files matched your search

+9
View File
@@ -8,6 +8,7 @@ import (
"net"
"net/netip"
"os"
"path/filepath"
"runtime"
"strings"
"time"
@@ -65,6 +66,14 @@ Safe to run again: it changes only what differs.`,
}
if !noFirewall {
mirrorFirewall(cmd.Context(), cmd.OutOrStdout(), controlPlanes)
// And after, as the cluster's settings say: the control plane
// tells the mirror, which writes it beside its models.
state := filepath.Join(*dir, mirror.FirewallFile)
if err := installFirewallSync(cmd.Context(), firewall.Local{}, state); err != nil {
fmt.Fprintf(cmd.OutOrStdout(), " !! firewall: %v; the cluster's settings will not change it here\n", err)
} else {
fmt.Fprintln(cmd.OutOrStdout(), " ok firewall: follows the cluster's settings ("+firewallSyncPathUnit+")")
}
}
return nil
},