mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-10-24 13:03:31 +00:00
dd11fe1be5
A frontend re-defined with
stick-table type ip size 200k expire 3h store http_req_rate(10s),gpc0_rate(10s),gpt0
kept rendering the old 100k/30s table after a Config Import of the full
frontend section, with no error or warning.
The import parser had no branch for `stick-table` (frontend or backend) or for
backend `stick on|match|store-request|store-response`, so those lines were
dropped silently. The frontend still used track-sc0 / sc_* counters, so the
renderer's v1.7.4 auto-inject added its default table in place of the
operator's one, and the gpc0 rules imported with it referenced counters the
table did not store.
- Parser: these lines are kept verbatim in the frontend/backend `options`
field (free-form, already rendered and snapshotted; no schema change)
and listed as import warnings.
- Import preview: options are merged per kind, so a stick-only import keeps
the stored `option` lines and vice versa. The table the generator emits
itself for Rate Limit / WAF rate_limit (type ip size 100k expire <N>s
store http_req_rate(10s)) is not stored where the generator will render
it, so round-trips show no change and later window edits still apply.
- The preview stripped every `track-sc0 src` / `sc_http_req_rate(0)` line
as auto-generated. It now strips only the exact generated forms, and
only on frontends with Rate Limit or an active rate_limit WAF rule;
operator trackers elsewhere were silently deleted on update.
- Renderer: a backend emits only its first `stick-table`. A second one is
fatal in HAProxy and made the agent reject the whole cluster config.
- Non-blocking advisories: a table without http_req_rate while Rate Limit
is active (HAProxy accepts it and the limit never fires), a table also
left in Request Headers, `stick on` without a table, `peers` references.
Configs without stick lines parse and render byte-identical (S0 render diff
empty; 70/70 stick-free test configs parse identically). Generated configs
pass `haproxy -c` on 3.3.10 and 2.6. No schema change, no agent change.
Fixes #72