feat(worker): supervise VPN connections and recover batched telemetry
This commit is contained in:
@@ -115,6 +115,13 @@ def private_file(path):
|
||||
|
||||
|
||||
def plan(stack: Path, ssh_alias: str, repository: Path, agents: Path):
|
||||
existing_tunnel = agents / (TUNNEL + ".plist")
|
||||
if existing_tunnel.exists():
|
||||
installed = plistlib.loads(private_file(existing_tunnel))
|
||||
if "k1link.compute_connections.link" in installed.get("ProgramArguments", []):
|
||||
raise ValueError(
|
||||
"Connection registry owns this tunnel; use install_compute_connection_links.py"
|
||||
)
|
||||
if not stack.is_absolute() or stack.resolve() != stack or not repository.is_absolute():
|
||||
raise ValueError("Canonical absolute installation paths required")
|
||||
if re.fullmatch(r"[a-zA-Z0-9][a-zA-Z0-9_.-]{0,80}", ssh_alias) is None:
|
||||
|
||||
Reference in New Issue
Block a user