Commit Graph

32 Commits

Author SHA1 Message Date
Paul Lorenz c0109319a6 Rename the ApiError.Code uses that compiled as method values. For #4401
- the peer controller error encoder read err.Code into a JSON map, which after the AppCode rename
  is a bound method that json.Marshal rejects, so every forwarded API error fell to the generic
  path; it now encodes AppCode and, as on 2.0.x, sends a cause with nothing to marshal as text
- the REST responder logged e.Code as a field for the same reason
- the perf-tagged rate limiter test compared the method value to a code string
- extracts encodeApiError and tests that the encoding succeeds and carries the code as a string
2026-09-16 11:49:54 -04:00
Paul Lorenz b6a2d2e951 Route library slog output through pfxlog. Fixes #4401
- adds common/slogbridge, a slog.Handler that emits records as logrus entries at the matching
  level, with attrs as fields, groups flattened to dotted keys, and the record caller set on the
  entry so pfxlog attributes each line to the library function that logged it
- gates on the logrus level at call time, so the configured level and agent set-log-level apply
  to library output without mirroring
- installs the handler as the root of foundation's logging registry and as the log/slog default,
  with the registry opened to trace so logrus is the only filter, in the CLI root init and both
  test package inits
- emits fatal and panic records at their own severity; Entry.Log never exits or panics
- moves foundation from the v2.0.86 pin to the commit carrying its logging registry, pending the
  v2.0.102 tag, and drops the replace directives in the root module and zititest
- renames errorz.ApiError.Code to AppCode at every site that range requires, in
  controller/apierror, api_impl, command, internal/routes, model, oidc_auth, raft and response
2026-09-15 13:27:13 -04:00
Paul Lorenz 40cbe44609 Backport raft rate limiting changes. Fxies #3772 2026-04-06 15:47:41 -04:00
Paul Lorenz f5091982b6 Backport rate limiter change using success instead of queue position. Fixes #3771 2026-04-06 15:47:41 -04:00
Paul Lorenz e647d67325 Update to channel/v4 2025-04-02 15:28:59 -04:00
Paul Lorenz 03870760c3 Ensure restores and migrations work properly with RDM. Add restore from db for HA Clusters. Fixes #2549. Fixes #2649. Fixes #2707 2025-01-31 13:57:43 -05:00
Paul Lorenz 32eddd61ca HA SDK terminators test. Fixes #2217. Fixes #2533 2024-11-12 18:45:08 -05:00
Paul Lorenz fb809263b3 Simplify raft bootstrapping and controller initialization. Fixes #2212 2024-11-01 15:21:01 -04:00
Paul Lorenz cccf0c06af Update to channel/v3. Fixes #2390 2024-09-09 12:23:25 -04:00
Paul Lorenz 0945427320 Migrated edge router tunneler code to use the router data model. Fixes #2121 2024-07-26 17:06:01 -04:00
Paul Lorenz ff8d70e418 Move rate limiter logging to debug 2024-04-09 19:48:25 -04:00
Paul Lorenz 8f4f9944f5 Add TLS handshake rate limiter. Fixes #1904 2024-04-09 17:25:35 -04:00
Paul Lorenz fab81e4cd4 Add terminator chaos testing and fix issues found. Fixes #1794 Fixes #1369 2024-03-12 10:31:36 -04:00
Paul Lorenz 3aace85a97 Refactor terminator state machine to be more like links state machine. Fixes #1733 Fixes #1734 2024-02-08 21:55:48 -05:00
Paul Lorenz 8423a8dd6a Fix link management race conditions found by chaos testing. Fixes #1709 2024-01-29 17:23:51 -05:00
Paul Lorenz 04873a250d Add auth rate limiter. Fixes #1657. Also add links fablab stress test. 2023-12-21 09:48:04 -05:00
Paul Lorenz 9bed8a14a8 Add optional command rate limiter. Fixes #1445 2023-10-23 13:45:49 -04:00
Paul Lorenz f3d67b7f49 Update fabric imports 2023-09-28 23:34:28 -04:00
Paul Lorenz cdfd037da9 Move protobuf definitions to common 2023-08-10 19:38:48 -04:00
Paul Lorenz 23110fccb2 Implement entity change events. Fixes openziti/fabric#562 2023-04-25 11:38:03 -04:00
Paul Lorenz f0b83d0010 Track raft index in Db. Let's us start without rerunning all cmds at startup. Fixes #677. Fixes openziti/fabric#582 2023-04-25 11:32:35 -04:00
Paul Lorenz d1d0fe781b Update for storage API changes. 2023-04-25 11:32:33 -04:00
Paul Lorenz abb0eb96fb Add more raft configuration options. Fixes openziti/fabric#597
Add more raft config knobs
Refactor peer handles to be consistent with other handlers
Allow inspect to work across controllers
Add config and clusterconfig inspect support
2023-02-15 23:47:57 -05:00
Paul Lorenz b5bae84325 Fix some handler removal. Only propagate crud terminator events on leader by default. Fixes openziti/fabric#573 2023-01-04 09:53:36 -05:00
Paul Lorenz e0f5092a08 Use one port for ctrl channel to router and controllers. Allow syncing existing DB to raft. Fixes #471. Fixes openziti/fabric#479. 2022-08-22 12:09:07 -04:00
Paul Lorenz 521c5d2be1 Fixes for command encoding and decoding 2022-08-11 11:24:23 -04:00
Paul Lorenz 0e07f211be Add flags to create/update commands. allows some lightweight logic specialization (eg priveleged vs non-priveleged updates) 2022-07-29 10:53:39 -04:00
Paul Lorenz 858642bc38 Move UpdatedFields to fabric. Start moving model layer to generics 2022-07-27 11:33:24 -04:00
Paul Lorenz 3d49022f4a Update for foundation changes 2022-07-01 14:29:12 -04:00
Paul Lorenz b26fcf8909 Fix copyright 2022-06-29 16:59:46 -04:00
Paul Lorenz a64c626cb4 Controller -> Manager for entity managers 2022-06-02 22:53:22 -04:00
Paul Lorenz eaa75d48c6 Initial support for distributed model via RAFT 2022-06-02 22:49:55 -04:00