Commit 8152f1e
Developer
ws: add mysql-pitr-agent daemon serving binlogs to the server
Agent now runs as a persistent daemon (serve) on the MySQL host: it reads
local binlog files, parses them via mysqlbinlog honouring targeted parse
parameters (binlog files, table, time range, positions), and executes
rollbacks locally. The server no longer accesses binlog files or MySQL
credentials — PITR operations are driven over the existing reverse-WS
tunnel (hub, dispatcher, internal CA) which is now wired into both
binaries: mTLS :9443 listener with file-backed CA, lifecycle hooks for
agent online/offline status, pitr_progress pushes, and pitr_cancel.
Web wizard drops mysql_dsn and selects connected agents; adds optional
targeted parsing fields. docker-compose gains a one-shot provision
service (CA extraction, agent registration, cert issuance, encrypted
config) and scripts/e2e-test.sh drives a full operation through the
agent. deploy/agent.service and install script run serve mode.
Also fixes pre-existing test breakage (chi route contexts, mock
interface drift, cert SAN/key-usage enforcement) across pitr, agent,
audit, ws packages.1 parent 0f812f7 commit 8152f1e
47 files changed
Lines changed: 3058 additions & 742 deletions
File tree
- cmd
- agent
- server
- deploy
- internal
- config
- server
- agent
- audit
- pitr
- ws
- agent
- ca
- hub
- openspec/changes/mysql-pitr-agent
- specs
- agent-binlog-service
- agent-daemon
- pitr-agent-execution
- pitr-operation-list
- scripts
- web/src
- api
- locales
- pages/pitr
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
65 | | - | |
| 69 | + | |
66 | 70 | | |
67 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 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 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
116 | 121 | | |
117 | 122 | | |
118 | 123 | | |
119 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
121 | 129 | | |
122 | 130 | | |
| |||
232 | 240 | | |
233 | 241 | | |
234 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
235 | 258 | | |
236 | 259 | | |
237 | | - | |
238 | | - | |
| 260 | + | |
| 261 | + | |
239 | 262 | | |
240 | | - | |
| 263 | + | |
241 | 264 | | |
242 | 265 | | |
243 | 266 | | |
| |||
247 | 270 | | |
248 | 271 | | |
249 | 272 | | |
250 | | - | |
251 | 273 | | |
252 | 274 | | |
253 | 275 | | |
254 | 276 | | |
255 | | - | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
256 | 289 | | |
257 | 290 | | |
258 | 291 | | |
259 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
260 | 297 | | |
261 | 298 | | |
262 | 299 | | |
| |||
336 | 373 | | |
337 | 374 | | |
338 | 375 | | |
339 | | - | |
| 376 | + | |
340 | 377 | | |
341 | 378 | | |
342 | 379 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | | - | |
65 | | - | |
| 80 | + | |
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
| |||
171 | 186 | | |
172 | 187 | | |
173 | 188 | | |
| 189 | + | |
174 | 190 | | |
175 | 191 | | |
176 | 192 | | |
| |||
190 | 206 | | |
191 | 207 | | |
192 | 208 | | |
| 209 | + | |
193 | 210 | | |
194 | 211 | | |
195 | 212 | | |
| |||
212 | 229 | | |
213 | 230 | | |
214 | 231 | | |
| 232 | + | |
215 | 233 | | |
216 | 234 | | |
217 | 235 | | |
| |||
248 | 266 | | |
249 | 267 | | |
250 | 268 | | |
251 | | - | |
| 269 | + | |
252 | 270 | | |
253 | 271 | | |
254 | | - | |
| 272 | + | |
255 | 273 | | |
256 | 274 | | |
257 | 275 | | |
| |||
284 | 302 | | |
285 | 303 | | |
286 | 304 | | |
| 305 | + | |
287 | 306 | | |
288 | 307 | | |
289 | 308 | | |
| |||
425 | 444 | | |
426 | 445 | | |
427 | 446 | | |
428 | | - | |
| 447 | + | |
429 | 448 | | |
430 | 449 | | |
431 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
0 commit comments