Open
Description
Issue
We want cc to emit audit.app.process.ready
and audit.app.process.not-ready
events as an app passes and fails the readiness health check.
Context
We want to make it easier for app devs to know if their apps are "ready" or "not-ready" as determined by the readiness health check.
Related PRs
- TPS - Watch for readiness health check changes tps#49
- RuntimeSchema - add AppReadinessChangedRequest cc message runtimeschema#19
- Cloud controller - Add process readiness changed controller and event cloud_controller_ng#3554
- Running CF Audit Events List Docs - add readiness events to audit events list docs-running-cf#116
- CATs - update readiness health check test to test audit events cf-acceptance-tests#997
- CAPI - I did not submit a PR to capi release to bump all of these things. Let me know if I should. I thought it might be easier for whoever merges all of these things to do it then.
Steps to Test
- Deploy the code from the PRs.
- Make sure you have at least Diego 2.81.0 deployed.
- Clone the code for the proxy app. It has good endpoints for testing health checks, including
/eventuallyfail
,/eventuallysucceed
, and/flap
. - Update the proxy manifest to have a readiness health check for the
/flap
endpoint (see diff below). - Push the proxy app
- Run
watch cf events APP
and see the desired output.
diff --git a/src/example-apps/proxy/manifest.yml b/src/example-apps/proxy/manifest.yml
index bba43604..f3538084 100644
--- a/src/example-apps/proxy/manifest.yml
+++ b/src/example-apps/proxy/manifest.yml
@@ -4,5 +4,8 @@ applications:
memory: 32M
disk_quota: 32M
buildpacks: [go_buildpack]
+ readiness-health-check-type: http
+ readiness-health-check-http-endpoint: /flap
+ readiness-health-check-interval: 10
env:
GOPACKAGENAME: proxy
Desired output
Every 2.0s: cf events potato mammatus: Thu Dec 14 17:18:17 2023
Getting events for app potato in org system / space system as admin...
time event actor description
2023-12-14T17:18:16.00+0000 audit.app.process.not-ready web index: 0, cell_id: c67943b4-79a1-450f-92d3-8e6ac141d4a0, instance: dc279be6-bc23-4a16-7b32-f83f
2023-12-14T17:17:36.00+0000 audit.app.process.ready web index: 0, cell_id: c67943b4-79a1-450f-92d3-8e6ac141d4a0, instance: dc279be6-bc23-4a16-7b32-f83f
2023-12-14T17:17:27.00+0000 audit.app.process.not-ready web index: 0, cell_id: c67943b4-79a1-450f-92d3-8e6ac141d4a0, instance: dc279be6-bc23-4a16-7b32-f83f
2023-12-14T17:16:47.00+0000 audit.app.process.ready web index: 0, cell_id: c67943b4-79a1-450f-92d3-8e6ac141d4a0, instance: dc279be6-bc23-4a16-7b32-f83f
2023-12-14T17:16:39.00+0000 audit.app.process.not-ready web index: 0, cell_id: c67943b4-79a1-450f-92d3-8e6ac141d4a0, instance: dc279be6-bc23-4a16-7b32-f83f
### Tasks
- [x] Docs
- [x] CATS
- [ ] CATS fails for windows. make this work
Metadata
Metadata
Assignees
Labels
No labels