-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
varnishncsa logs header values even if they have in fact been unset #3528
Comments
notes from bugwash
|
Bugwash redux:
|
This ticket is not actionable at this point, moved to VIP status: https://github.com/varnishcache/varnish-cache/wiki/VIP32:-VSL-API-and-Unset-headers |
@bsdphk any hope for seeing this move forward ? We get regularly bitten by this, where our varnishncsa-based trafic logs report a resp header as being present when it was in fact unset before the resp is delivered. Makes some very puzzling debugging moments ("I didn't receive the header" / "well, our logs say we did send it"), until you remember "ah right, it's because varnishncsa doesn't see unsets" |
@walid-git will first survey varnishncsa format patterns and list the ones that are first- or last-match so we can assess the current situation. |
Apologies, it took a long time, but we finally have both an inventory of how formats are currently collected and a proposal for better handling. Let's start with the inventory: Last match
First match
We looked at the meaning of the various formats and derived three categories. You may notice that some formats are missing from the lists above, they are either variations on the same format (like Here goes the proposal: What we receive from a peerClient rule: first match before
What we send to a peerClient rule: last match.
What happens inside VarnishRule: first match. In many cases it should be synonymous to the only match.
Other
With these categories, we would mostly maintain the current behavior, and improve formats from the first two categories (the same formats, but from opposite sides). |
I have not reviewed the formats in detail, but I agree to the overall concept first for "receive" and last for "send". |
bugwash is in agreement with dridis proposal, @walid-git volunteered to have a go at a PR - thank you |
With this change, [Be]rsp/[Be]req formats should match exactly what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. Note that this is a breaking change in varnishncsa's default behavior. Refs: varnishcache#3528
With this change, [Be]rsp/[Be]req formats should match exactly what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. Note that this is a breaking change in varnishncsa's default behavior. Refs: varnishcache#3528
With this change, [Be]resp/[Be]req formats should reflect better what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. There is however still an exception for the changes performed by the core code before vcl_recv for req and before vcl_backend_response for beresp that cannot be distinguished from the original headers. Refs: varnishcache#3528
With this change, [Be]resp/[Be]req formats should reflect better what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. There is however still an exception for the changes performed by the core code before vcl_recv for req and before vcl_backend_response for beresp that cannot be distinguished from the original headers. Refs: varnishcache#3528
With this change, [Be]resp/[Be]req formats should reflect better what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. There is however still an exception for the changes performed by the core code before vcl_recv for req and before vcl_backend_response for beresp that cannot be distinguished from the original headers. Refs: varnishcache#3528
With this change, [Be]resp/[Be]req formats should reflect better what was received/sent from/to the backend/client without taking irrelevant VCL changes into account. There is however still an exception for the changes performed by the core code before vcl_recv for req and before vcl_backend_response for beresp that cannot be distinguished from the original headers. Refs: varnishcache#3528
(Maybe somewhat related to #3527 ?)
In VCL :
Expected behavior :
varnishncsa -f "%{X-My-Header}o" --> nothing
Current behavior :
varnishncsa -f "%{X-My-Header}o" --> "not-actually-sent"
We use varnishncsa to collect request logs in ELK, it is impossible to distinguish requests where the header was present from those where it was actually unset before sending the response
The text was updated successfully, but these errors were encountered: