summaryrefslogtreecommitdiff
path: root/oslo_middleware/healthcheck
Commit message (Collapse)AuthorAgeFilesLines
* Drop use of sixSean McGinnis2020-05-063-12/+9
| | | | | Change-Id: I53005107bf4c05809182dc3865c5dc72c77b1054 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Do not use the deprecated best_match() methodCyril Roelandt2019-03-281-2/+4
| | | | | | This requires an upgrade of WebOb to 1.8.0. Change-Id: Ifb0abb958ca30f19b4937384d9d732e2dc4e35a5
* Document security considerations for detailed healthcheckBen Nemec2018-10-051-1/+5
| | | | | | | | | The detailed healthcheck output includes some potentially sensitive information like stack traces of the service. This may be unacceptable in some organizations and we should point it out in the help for the option. Change-Id: Ic10c29f39ef601e4c7873acb0d56e1ec8e4ebcb3
* Fix exception in json response under py35Yujun Zhang2017-07-311-0/+1
| | | | | | | charset is required when response with body Closes-Bug: #1707127 Change-Id: I9921c67866d252f972954eed5afbc90389e06c3f
* Remove usage of parameter enforce_typeChangBo Guo(gcb)2017-05-311-2/+1
| | | | | | | | | We deprecate and change parameter enforce_type's default value to True[1], and will remove it int the future, so don't need it anymore. [1] https://review.openstack.org/328692 Change-Id: I243444f53e14543c5e4ae4c40d9582fb2d17e155
* Remove log translations3.25.0lioplhp2017-03-281-6/+5
| | | | | | | | | | | | | Log messages are no longer being translated. This removes all use of the _LE, _LI, and _LW translation markers to simplify logging and to avoid confusion with new contributions. See: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html Change-Id: I797b5f0374d6f8ca1cb4641246cab414aa5466dd
* Transform healthcheck from filter to an application3.22.0Julien Danjou2016-12-012-17/+50
| | | | | | | | | | | The healthcheck middleware has actually wrongly been designed as a filter, whereas it is its own application. This patch fixes that by exporting the healthcheck middleware as an application, while keeping the old behaviour for compatibility with existing deployment. Change-Id: I1ff43c71449f1955267faf6a85f4d70f705db097
* Merge "Suggest to use egg based filter_factory rather than fragile full path"Jenkins2016-12-011-3/+3
|\
| * Suggest to use egg based filter_factory rather than fragile full pathJulien Danjou2016-11-291-3/+3
| | | | | | | | | | | | This makes sure that if the module organization change, nothing breaks. Change-Id: Ib4fb1e2210a9cea6b12214e0d1e3570086ac2e68
* | Merge "Document how to use detailed mode in healthcheck"3.21.0Jenkins2016-11-291-0/+4
|\ \ | |/ |/|
| * Document how to use detailed mode in healthcheckMatt Fischer2016-11-281-0/+4
| | | | | | | | | | | | | | The detailed mode is referenced in the documenation but it is never explained how to enable it. This exposes it in the docs. Change-Id: I136669a7dd0e6e0d293a9b9ea1b685de82404e2b
* | Remove self-referential link in docsMatt Fischer2016-11-281-3/+0
|/ | | | | | | | The link in this file points to the same page that hosts the content. You can see this here: http://docs.openstack.org/developer/oslo.middleware/healthcheck_plugins.html Change-Id: I9645917f8f6d1a586d66ad1a6dddda20f949aeb6
* Allow healthcheck to be configured by oslo.configJamie Lennox2016-11-024-26/+91
| | | | | | | | | | | | | It is standard practice in oslo.middleware to allow configuration via both the paste file and the oslo.config file. Projects such as keystone don't allow shipping default configuration in the paste.ini files. Use the configuration methods provided by the existing base middleware to allow configuing via oslo.config and register the sample options available for the middleware. Closes-Bug: #1634329 Change-Id: I33b7b1f9d945280265eb3b712cb85a2d66616c17
* Merge "Show more healthcheck examples"Jenkins2016-08-291-25/+178
|\
| * Show more healthcheck examplesJoshua Harlow2016-08-231-25/+178
| | | | | | | | Change-Id: I164b192f85ee9232a92ad7a5e99a3af647813dc8
* | Merge "Fix inline docstring to use default path (not /status)"Jenkins2016-08-241-2/+2
|\ \ | |/
| * Fix inline docstring to use default path (not /status)Joshua Harlow2016-08-231-2/+2
| | | | | | | | Change-Id: Iff4256b7f7b523631ebddb6c9da9323b65cd0613
* | Fix unit tests on WindowsGabriel Adrian Samfira2016-07-131-1/+3
| | | | | | | | | | | | | | | | | | Relatively small fix enabling tests to pass on Windows. Connecting to the ANY address on Windows is not allowed. Also, paths in Windows, most times contain a colon. Doing a split() on a string such as 80:C:\test will yield 3 elements, not 2. Change-Id: Icbf466940d4f1ac2a1d48c63839cd31e2ec62581
* | Add a simple __main__ to easily show healthcheck outputJoshua Harlow2016-05-091-0/+69
|/ | | | | | | | Seems like not many people know what the detailed output of this thing does, so in order to make it easier to see that add a simple __main__ entrypoint. Change-Id: Ife3b49c29df7d3558efebb4584971cf69bc8359d
* Drop python 2.6 supportChangBo Guo(gcb)2015-11-241-7/+2
| | | | Change-Id: Id5de889fb3aaa3905400dab8cc03c3240ca67a83
* Merge "Allow health check results to provide there own details"Jenkins2015-11-203-9/+40
|\
| * Allow health check results to provide there own detailsJoshua Harlow2015-09-293-9/+40
| | | | | | | | | | | | | | | | | | When in detailed mode, show the provided details in a nicely formatted table (or json) so that the user of the healthcheck middleware can gain more insight into the result that was produced. Change-Id: I2fc1f7588ee628990d78b15ad337bd0eebbe8fb3
* | Add a disabled by ports -> files healthcheck pluginJoshua Harlow2015-10-223-3/+55
|/ | | | | | | | | | | | Since most openstack applications do not run on a single port it is useful to be able to have a single healthcheck plugin that can respond to requests for different ports with different files; this way for example keystone admin port can be disabled while its public port can be kept active (without having to run two different applications, one for the admin endpoint and one for the public endpoint). Change-Id: I0bafb5a2091e54c9f01f24812438296b75afaf63
* Merge "Further improve the healthcheck output"Jenkins2015-09-261-1/+98
|\
| * Further improve the healthcheck outputJoshua Harlow2015-09-171-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add on information about the active threads and active greenthreads and some basic server information to be able to show this to operators (or others) that have detailed mode enabled and can benefit from this information being output. This addition makes it so that basic diagnostic information can be obtained from the response of the healthcheck middleware and not just OK or NOT OK; making the eventlet backdoor feature that oslo.service provides less needed for operators. Change-Id: I469c56586597561633921ebf3916585646f45373
* | Avoid any body when request is a HEAD requestJoshua Harlow2015-09-171-5/+32
|/ | | | | | | | | | | Instead of creating a body for a request that is known to be a HEAD request avoid creating any body in the first place and just return the status code determined from the health evaluation. Closes-Bug: #1494533 Change-Id: I39abee3cdfff4af40355f91d22607e3a2aa52e29
* Allow the healthcheck middleware to provide more detailed responsesJoshua Harlow2015-09-171-16/+145
| | | | | | | | | | | | | | | | | | It can be quite useful to have admin endpoints for healthcheck middleware provide more information about the health of the system. To enable this kind of information this initial step starts to add a jinja2 template that will produce the existing simple case by default, but when setup with detailed mode it can then produce more information about which checks were performed and there results. It can be expanded in the future to provide more information as desired (possibly showing more useful application level info when in detailed mode). Closes-Bug: #1494531 Change-Id: I9c6dae848985d950c3cf6798695c7669eb245ccb
* Restore backward compat of paste factoryMehdi Abaakouk2015-08-201-1/+1
| | | | | | | | | | | | | Some application inherits from our middleware class When we homogenize the signature and configuration handling of all middlewares we break them. This change fixes that. Closes-bug: #1486735 Change-Id: I40c3d59110c6f8c5a1b3d3ccc734dc441069b025
* Do not dump HealthcheckResult class sourceDavanum Srinivas2015-08-171-1/+1
| | | | | | | | | | If verbose is true, the class definition is printed just before being built. We don't really need to print this into our logs, so we should drop the verbose parameter (as it defaults to False anyway). Closes-Bug: #1482744 Change-Id: Ic6cb7fe9c87151bb0c318d060fd88bb2e1977404
* Remove usage of oslo.config globalMehdi Abaakouk2015-08-071-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently application that doesn't use the global configuration object have to rely on hack to setup the global oslo config object for each middleware it want to use. For example, gnocchi have its own middleware loader and add crap to load keystonemiddleware: https://github.com/openstack/gnocchi/blob/master/gnocchi/rest/app.py#L140 And it can't use oslo.middleware that relies on the global conf object. Also aodh (use 'paste' for middleware) have to hack the global configuration object for each middlewares it want to use by code... https://review.openstack.org/#/c/208632/1/aodh/service.py But middleware are optional deployer stuffs, we should not write any code for them... This change allows application to use paste-deploy (or any middleware loader) without enforcing the application to use the global oslo.config object. If the middleware want to use oslo.config it should load the configuration file himself (and fallback to the global one if any) The proposed paste configuration to allow this is: [filter:cors] paste.filter_factory = oslo.middleware:cors oslo_config_project = aodh So the cors middleware can find and load the aodh config and what is it interested in. Also, some of them use oslo.config local, some other the global object. Some can be loaded by an middleware loader like paste, some other not. This change make consistent the way we bootstrap all middlewares. Closes-bug: #1482086 Change-Id: Iad197d1f3a386683d818b59718df34e14e15ca5c
* Update response body when healthcheck is availableKamil Rykowski2015-04-241-2/+2
| | | | | | | | | | | | | According to the Healthcheck documentation [1]_ the 200 response returns "OK" as the body if none of the backends report an application issue. Current implementation returns empty body which is confusing, so it has been updated to cover the docs. [1] http://docs.openstack.org/developer/oslo.middleware/api.html#oslo_middleware.Healthcheck Change-Id: I5fb9045112658ef74b8a831bc7814f30c9f42053 Closes-bug: 1414646
* Fixes the healthcheck factory method and docs0.4.0Mehdi Abaakouk2015-01-262-4/+62
| | | | | | | | This change fix the factory method of the healthcheck middleware It also adds documentation about how to configure the middleware Change-Id: Ie549d4686e921a9d407ba2829f69f92216bfcf9a
* Move i18n module to a private nameDoug Hellmann2015-01-211-1/+1
| | | | | | | The i18n module for this library is private to the library and should never be used by outside code. Rename the module to reflect this. Change-Id: I39149056daeeb27428b938fb9cd7278cd42f2444
* Add healthcheck middlewareMehdi Abaakouk2015-01-193-0/+147
Implements blueprint oslo-middleware-healthcheck Change-Id: Id19a47c07ff4fbf954ab188b7186361ed9ef213a