This commit adds an 'untargeted' directory to hold orphaned specs that were approved but aren't being worked on. A new index.rst is added explaining the idea, and adjustments are made to other appropriate index pages. Additionally, one glanceclient spec from liberty was stuck in a non-release-name directory; it was moved to the liberty directory, which in turn was slightly reorganized to accommodate both glance and glanceclient specs. Change-Id: I074fc782eca1c3e3c9a1c504501973300741b110
2.8 KiB
HealthCheck Middleware
https://blueprints.launchpad.net/glance/+spec/healthcheck-middleware
HealthCheck Middleware provides <SERVER>:<PORT>/healthcheck endpoint. This endpoint behaves similar way as it does in Swift[1]. Normal operations returns 200 OK and if config option disable_path is enabled and that path exists it will return 503 DISABLED BY FILE.
Problem description
Currently Glance does not have any reasonable means to provide health check information for example to HAProxy. Any such deployment causes extensive logging and causes unnecessary operations in the server end (FE. GET request to / which leads to version check).
Proposed change
Take advantage of oslo.middleware
's healthcheck
middleware by:
- Adding a new paste filter -
healthcheck
- Adding the new filter to the default Glance API and Registry pipelines
Disabled functionality would allow using a file in the filesystem to return 503 DISABLED BY FILE response dropping the node from the HAProxy. This would allow the nodes disabled to finish their current operations and improve maintenance experience in HA deployments.
Alternatives
Current operations model.
Take Swift's slightly smaller implementation and copy it directly into Glance's source tree.
Data model impact
None
REST API impact
GET '/healthcheck' 200 OK, 503 DISABLED BY FILE
Security impact
None
Notifications impact
None
Other end user impact
None
Performance Impact
Potential performance improvement as healthcheck is done quite frequently and the middleware is lightweight filter at the start of the pipeline.
Other deployer impact
healthcheck would be added to the start of the used pipeline to be used. Optional disable_path=PATH option would be needed to the config files to enable the discreet disable functionality.
Developer impact
None
Implementation
Assignee(s)
- Primary assignee:
-
jokke kamil-rykowski
- Core Reviewers:
-
kragniz flaper87 icordasc
Work Items
Code Change Tests Config Change Documentation Change
Dependencies
None
Testing
Simple functional tests to verify the responses form the <SRV>:<P>/healthcheck
Documentation Impact
Documentation changes are quite minimal explaining the new config option and functionality.
References
[1] _https://github.com/openstack/swift/blob/master/swift/common/middleware/healthcheck.py