-
Notifications
You must be signed in to change notification settings - Fork 401
backend: add VSCs for backend errors #4337
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
Open
asadsa92
wants to merge
7
commits into
varnishcache:master
Choose a base branch
from
asadsa92:vbe_close_acct
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f3415f3
sess_close: restrict the range of stream_close_t
asadsa92 836454a
backend: add VSCs for backend errors
asadsa92 85938f3
v1f: report HTC_S_EOF as SC_REM_CLOSE
asadsa92 cc612f0
varnishd: introduce debug bit for PROXY_ERROR
asadsa92 268b182
backend: move vbe_dir_finish for what comes next
asadsa92 725e716
varnishd: minor refractory for PROXY send error
asadsa92 8a872b0
varnishd: add VSC per backend connection closed
asadsa92 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -229,9 +229,9 @@ V1F_FetchRespHdr(struct busyobj *bo) | |
| VSLb(bo->vsl, SLT_FetchError, "Received junk"); | ||
| htc->doclose = SC_RX_JUNK; | ||
| break; | ||
| case HTC_S_CLOSE: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this particular change lgtm |
||
| case HTC_S_EOF: | ||
| VSLb(bo->vsl, SLT_FetchError, "backend closed"); | ||
| htc->doclose = SC_RESP_CLOSE; | ||
| htc->doclose = SC_REM_CLOSE; | ||
| break; | ||
| case HTC_S_TIMEOUT: | ||
| VSLb(bo->vsl, SLT_FetchError, "timeout"); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| varnishtest "Failing to send proxy headers to backend" | ||
|
|
||
| server s1 {} -start | ||
|
|
||
| varnish v1 -vcl { | ||
| backend default { | ||
| .host = "${s1_addr}"; | ||
| .port = "${s1_port}"; | ||
| .proxy_header = 2; | ||
| } | ||
| } -start | ||
|
|
||
| varnish v1 -cliok "param.set debug +proxy_error" | ||
|
|
||
| logexpect l1 -v v1 { | ||
| expect * 1002 Timestamp {^Connected:} | ||
| expect * 1002 FetchError {^backend default: proxy write errno} | ||
| expect * 1002 BackendClose {default close TX_ERROR} | ||
| } -start | ||
|
|
||
| client c1 { | ||
| txreq | ||
| rxresphdrs | ||
| expect resp.status == 503 | ||
| } -run | ||
|
|
||
| logexpect l1 -wait | ||
|
|
||
| varnish v1 -expect MAIN.backend_conn == 1 | ||
| varnish v1 -expect MAIN.backend_req == 0 | ||
| varnish v1 -expect MAIN.backend_closed == 1 | ||
| varnish v1 -expect MAIN.backend_closed_err == 1 | ||
|
|
||
| varnish v1 -expect MAIN.bc_rx_bad == 0 | ||
| varnish v1 -expect MAIN.bc_rem_close == 0 | ||
| varnish v1 -expect MAIN.bc_rx_timeout == 0 | ||
| varnish v1 -expect MAIN.bc_tx_error == 1 | ||
| varnish v1 -expect MAIN.bc_tx_proxy == 0 | ||
|
|
||
| varnish v1 -expect VBE.vcl1.default.conn == 0 | ||
| varnish v1 -expect VBE.vcl1.default.req == 0 | ||
| varnish v1 -expect VBE.vcl1.default.fail == 0 | ||
| varnish v1 -expect VBE.vcl1.default.closed == 1 | ||
| varnish v1 -expect VBE.vcl1.default.closed_err == 1 | ||
|
|
||
| varnish v1 -expect VBE.vcl1.default.rx_bad == 0 | ||
| varnish v1 -expect VBE.vcl1.default.rem_close == 0 | ||
| varnish v1 -expect VBE.vcl1.default.rx_timeout == 0 | ||
| varnish v1 -expect VBE.vcl1.default.tx_error == 1 | ||
| varnish v1 -expect VBE.vcl1.default.tx_proxy == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a commit before where you move vbe_dir_finish as-is without modification such that we can see clearly in this commit what the changes are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I found that I had misplaced the opening curly for the function. See 268b182