Commit 9e2018e
Drop decommissioned us-west region and verify node identity in health check
cdn-2.runonflux.io was shut down for non-payment and the hosting
provider re-leased its IP, 107.175.82.227, to another tenant. Every US
client subnet was still being handed that address:
US-West 23.235.32.0/24 -> 107.175.82.227
US-East 4.14.0.0/24 -> 107.175.82.227
EU 159.195.85.0/24 -> 159.195.85.44
Asia 180.188.197.0/24 -> 180.188.197.165
The new occupant answers 443 with a Let's Encrypt certificate for an
unrelated domain, so US visitors to images.runonflux.io and
cdn.runonflux.io got a dropped connection, and flux_configd's
fetch_params mirror failed on US nodes.
Remove the region from both the production (cdn-geo) and staging
(cdn-geodev) zone configs.
The deeper problem is that this never failed over. ifportup(443, ...)
only establishes that something accepts TCP on 443, and the new tenant
runs nginx there, so PowerDNS went on marking the node healthy
indefinitely. A server that had simply been powered off would have been
removed automatically; one replaced by a stranger's was not.
Switch to ifurlup() against a /health endpoint added to every CDN vhost
in flux-cdn-deploy, matching a distinctive token in the body. The check
now answers "is this still our node" rather than "is a socket open".
Details worth noting:
- ifurlup() takes a list of address SETS where ifportup() took a flat
list. All candidates go in one set, so the selector still chooses
among every healthy node.
- The probe URL is cdn.runonflux.io, not the per-zone hostname. It has
to be a vhost every candidate serves, and cdn-geodev.runonflux.io is
not served by cdn-1 or cdn-3 - using it would mark every node down and
take the zone out entirely.
- timeout goes 2s -> 3s: the old check timed a TCP connect, this also
completes a TLS handshake and an HTTP GET, and EU->Hong Kong is about
three round trips. minimumFailures=3 still absorbs transient overruns.
- backupSelector stays pickclosest, so if every node were to fail the
check the zone degrades to nearest-node rather than returning nothing.
Verified by rendering both environments and exercising the result under
a real Lua interpreter with the PowerDNS globals stubbed: URL, set
structure, per-function selectors, and that the shared option table is
copied rather than mutated between calls.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent dd02cc3 commit 9e2018e
2 files changed
Lines changed: 78 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
36 | 74 | | |
37 | 75 | | |
38 | 76 | | |
39 | 77 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
48 | 84 | | |
49 | 85 | | |
50 | 86 | | |
| |||
54 | 90 | | |
55 | 91 | | |
56 | 92 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 93 | + | |
| 94 | + | |
64 | 95 | | |
65 | 96 | | |
66 | 97 | | |
| |||
79 | 110 | | |
80 | 111 | | |
81 | 112 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 113 | + | |
88 | 114 | | |
89 | 115 | | |
90 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
24 | 43 | | |
25 | 44 | | |
26 | 45 | | |
| |||
29 | 48 | | |
30 | 49 | | |
31 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
32 | 57 | | |
33 | 58 | | |
34 | 59 | | |
35 | 60 | | |
36 | 61 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 62 | | |
42 | 63 | | |
43 | 64 | | |
| |||
69 | 90 | | |
70 | 91 | | |
71 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
72 | 99 | | |
73 | 100 | | |
74 | 101 | | |
75 | 102 | | |
76 | 103 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | 104 | | |
82 | 105 | | |
83 | 106 | | |
| |||
0 commit comments