-
Notifications
You must be signed in to change notification settings - Fork 363
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
Readiness health checks story 5 processes #3370
Readiness health checks story 5 processes #3370
Conversation
9e635bc
to
c150f3b
Compare
GET /v3/processes GET /v3/processes/:guid PATCH /v3/processes/:guid GET /v3/apps/:guid/processes GET /v3/apps/:guid/processes/:type PATCH /v3/apps/:guid/processes/:type POST /v3/apps/:guid/processes/:type/actions/scale
c150f3b
to
3c008b0
Compare
@@ -18,6 +18,9 @@ def associated_resources | |||
def to_hash | |||
health_check_data = { timeout: process.health_check_timeout, invocation_timeout: process.health_check_invocation_timeout } | |||
health_check_data[:endpoint] = process.health_check_http_endpoint if process.health_check_type == HealthCheckTypes::HTTP | |||
|
|||
readiness_health_check_data = { invocation_timeout: process.readiness_health_check_invocation_timeout } |
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.
why do readiness health checks not have timeouts
like the original health check?
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.
@sethboyles health-check-timeout
represents start up timeout. When app starts up we run liveness health check for this period to mark it as Running. If it never succeeds for the first time during that timeout period we mark app as crashed and we don't event restart it since it was never running. Readiness health checks don't have that behavior. They start running after app instance is started and marked as Running.
* Add readiness health check properties to app manifest * Set readiness health check properties on process Now when a user supplies the readiness health check properties via the app manifest, the values are stored on the process, and saved in the database. * correctly default to process for readiness_health_check_type * Refactor: add base health check policy class * Set readiness health check properties on LRP * Refactor: app recipe builder now with more ruby style! * Fix: readiness hcs default to process not empty * Add readiness health check properties to /v3/apps/:guid/manifest * Return diff for readiness check properties in /v3/spaces/:space_guid/manifest_diff * Readiness health checks story 5 processes (#3370) * Add readiness health check properties to process endpoints GET /v3/processes GET /v3/processes/:guid PATCH /v3/processes/:guid GET /v3/apps/:guid/processes GET /v3/apps/:guid/processes/:type PATCH /v3/apps/:guid/processes/:type POST /v3/apps/:guid/processes/:type/actions/scale * Add readiness health check examples to API docs * Rolling deploy respects readiness health check (#3373) ActualLRP has routable set to true once readiness health check succeeds. In case if routable is not provided instance reporter sets it to true for backwards compatibility. * Readiness health checks story 7 respect defined interval (#3385) * Validate health_check_interval/readiness_health_check_interval in the manifest * Save health_check_interval/readiness_health_check_interval in database * Regenerate bbs protobuf models * Pass health_check_interval/readiness_health_check_interval in LRP * Display health_check_interval/readiness_health_check_interval in manifest * Add health-check-interval/readiness-health-check-interval to manifest diff * Add health-check-interval/readiness-health-check-interval to manifest docs * Add health_check_interval/readiness_health_check_interval to /v3/processes * Add health_check_interval/readiness_health_check_interval to API docs * Copy health_check_interval/readiness_health_check_interval during rolling deploy * add need readiness check doc to index * Disable rubocop cyclomaticcomplexity for some functions - these functions are idomatic ruby with no nested if statements - rubocop is just counting if statements so no current concerns - please review if this changes * Do not use text:true on readiness health check to process - see https://github.com/cloudfoundry/cloud_controller_ng/wiki/CAPI-Migration-Style-Guide#always-specify-a-size-for-a-string-and-dont-use-text Signed-off-by: Marc Paquette <[email protected]> Signed-off-by: Amelia Downs <[email protected]> Signed-off-by: Renee Chu <[email protected]> Signed-off-by: Maria Shaldybin <[email protected]> Signed-off-by: Josh Russett <[email protected]>
This PR is part of a larger effort detailed here in this Cloud Controller PR and here in this CFF RFC.
In this story
/v2
summary endpoints and we don't need to change them for/v3
endpoints.Acceptance Setup
Deploy capi-release with this PR.
Push an app.
See that readiness health check type is set to
process
:by checking endpoints:
Update readiness health check using process type endpoint:
See that readiness health check type is set to
http
:by checking endpoints:
Update readiness health check using process endpoint:
See that readiness health check type is set to
port
(notice thatendpoint
is not displayed:by checking endpoints: