Use cgi response code as error check point#37
Open
gabrielfernandes-codes wants to merge 1 commit intorenatomefi:masterfrom
Open
Use cgi response code as error check point#37gabrielfernandes-codes wants to merge 1 commit intorenatomefi:masterfrom
gabrielfernandes-codes wants to merge 1 commit intorenatomefi:masterfrom
Conversation
renatomefi
requested changes
Jul 6, 2020
Owner
renatomefi
left a comment
There was a problem hiding this comment.
Hello @fernandesGabriel,
Thanks for this contribution, I think it's a good addition to the script!
I added some comments, and could you please also add tests for the change?
Thanks again!
Author
|
Hi @renatomefi Sorry for the long time to reply you. I will take a look on your messages, as well as why the tests haven't passed. |
168fc0a to
d6795dc
Compare
d6795dc to
2c1bd6c
Compare
Author
|
@renatomefi I have updated this branch as my user was associated with my work email. Also made some minor adjustments. Please review and let me know if there is anything I should change. Tests are commented out as it would require a #38 to make it work properly. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
The motivation of this pull request are the following:
1 - For some reason, the response from cgi-fcgi had a different header size in case of the path was non-existent, in this way, even 404 responses weren't failing, since
tail +5was suppressing the response message as well.2 - Checking only the response message could reduce the customizability of the script, that also could be used to check other endpoint instead only the fpm-status page, so in case this healthz page would reply something as 400, 500 or 503 for example, it wouldn't be possible to fail the health check.
In this way, the changes done substituted a single check for failed responses message, to a verification of failed response codes, in compliance of Kubernetes probe failure requirements.(https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
Changes