feat(network): verify selected uplinks, roll back failures and manage NetBird policy

This commit is contained in:
DCCONSTRUCTIONS
2026-11-21 20:58:26 +03:00
parent a50d638ced
commit 43d4916331
63 changed files with 6743 additions and 12 deletions
+5
View File
@@ -53,6 +53,8 @@ class FleetRegistry:
self.monitor = MonitorReceiver(root)
from .rover_control import RoverControl
self.rover_control = RoverControl()
from .uplinks import Uplinks
self.uplinks = Uplinks(guard=self.rover_control.network_change)
from .rover_channel import RoverChannel
self.rover_channel = RoverChannel(self.rover_control)
from .rover_configuration import RoverConfigurations
@@ -429,6 +431,7 @@ class FleetRegistry:
self.network_profiles.reconcile()
with self.lock:
self.routers.prune()
self.uplinks.prune()
active = [row for row in self.rows() if row["enrollment"] in ("pending", "paired")]
for address in {address for row in active for address in listener_addresses(row)}:
try:
@@ -515,6 +518,7 @@ class FleetRegistry:
sensor_response = sensors.heartbeat(row, value)
configuration_response = self.rover_configurations.heartbeat(node_id, value)
network_response = self.network_profiles.heartbeat(row, value)
uplink_response = self.uplinks.heartbeat(row, value)
archive_ack = None
archive_started = time.monotonic()
try:
@@ -573,6 +577,7 @@ class FleetRegistry:
"client_pem": row["binding"]["client_pem"],
**configuration_response,
**network_response,
**uplink_response,
**sensor_response,
**enrollment_response,
**router_response,