You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
state: a rejected listener patch is partially applied in the main state #1703
Found during #1694. Measured on main at 9e55ad621db2a4f738f7a0ec54401f7f8e3e8291.
ConfigState::update_http_listener, update_https_listener and update_tcp_listener (command/src/state.rs) apply a listener patch field by field on the stored listener and validate some fields in between (e.g. sozu_id_header, forwarded_headers, H2 flood knobs, ALPN). When a validation fails partway through, the function returns an error but the fields written before the failing one stay applied in the main process state.
Effect: a rejected Update*ListenerConfig can leave the main state partially updated, while workers either applied nothing or applied the whole patch (depending on their own validation order) — main and workers can disagree, and listener list, SaveState and upgrade replay then reflect a configuration nobody asked for.
Fix: validate the whole patch first, then apply it (or apply to a clone and swap on success), in all three functions; keep the worker side consistent (same all-or-nothing semantics). Tests: a patch whose last field is invalid leaves the stored listener byte-identical; the error is returned; the worker rejects it the same way.
Activity
fix(state): apply a listener patch all-or-nothing on main and workers
fix(state): apply a listener patch all-or-nothing on main and workers (…
fix(state): record a listener patch's answers map and HTTPS hsts in t…