mirror of
https://github.com/Vateron-Media/XC_VM.git
synced 2026-10-31 19:03:43 +01:00
Review findings on the early release of old MAIN ports: - An enrolment code carries one MAIN URL, the policy's first when it was issued, and the agent dials only that URL for enrol_code and enrol_code_status. release() now releases nothing while a code has not expired, or a request made with one waits for approval and is less than 30 minutes old (the agent's wait). Once approved, the enrolling row holds the ports as before. - Under https_required no node reports a plain-HTTP port, yet the plain-HTTP URLs a node has known carry the signed challenge it recovers through when HTTPS fails. A kept plain-HTTP port or http:// URL now keeps its 7 days there; a kept https:// URL still goes early. The transport is read from the database with the kept lists. - A cluster_nodes row whose server was deleted no longer holds every port forever: portsInUse() reads only rows whose server exists. - An agent heartbeats MAIN in every mode. A node in mode 0 is still not waited for, but while it is heard the port it last reached MAIN on stays. Tests cover each of these, the kept https:// URL on a port a node still uses surviving a release, a quarantined node, the port read from nginx's SERVER_PORT, the last second of an enrolment, the largest policy_ver and the bounds of the offline window. The diagnostics page says that early release needs an agent that reports its policy version, which none does yet, and what delays it. ADR 0004 and the plan record the new rules and limits; the agent contract is unchanged.