Commit Graph

7 Commits

Author SHA1 Message Date
Takashi Kajinami ce217a287c Deploy healthcheck middleware as app instead of filter
Using the healthcheck middleware as a filter is deprecated and
the middleware should be used as an application[1].
 [1] 6feaa13610c450c8486f969703768db5319b4846

This change updates definition and usage of the healthcheck middleware
accordingly to avoid the following deprecation warning.

DeprecationWarning: Using function/method 'Healthcheck.factory()' is
deprecated: The healthcheck middleware must now be configured as
an application, not as a filter.

Change-Id: Ie81140d3b03c315f0a057d2f59754ee14dac539c
2021-08-19 10:21:15 +09:00
Tovin Seven 32d088b2c1 Integrate OSProfiler in Magnum
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
  1) It checks that person who wants to trace is trusted and knows
     secret HMAC key.
  2) It starts tracing in case of proper trace headers
     and adds first wsgi trace point, with info about HTTP request

* Add initialization of osprofiler at start of service
  Currently that includes oslo.messaging notifer instance creation
  to send Ceilometer backend notifications.

* Traces HTTP/RPC/DB API calls

Demo: https://hieulq.github.io/cluster-create-false-new-html.html

Co-Authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Implements: blueprint osprofiler-support-in-magnum
Change-Id: I7d68995aab81d365433950aada078ef1fcd5469b
2017-01-24 07:43:31 +07:00
Tovin Seven 143687974d Remove extra spaces
Remove extra spaces in ini files

Change-Id: I81b3a98687ff87a0a447c25a479a2ec74c7489c1
2017-01-17 10:21:28 +07:00
Deepak 67121813d5 Add http_proxy_to_wsgi to api-paste
This sets up the HTTPProxyToWSGI middleware in front of magnum. The
purpose of thise middleware is to set up the request URL correctly in
case there is a proxy.

Closes-Bug: #1590608
Change-Id: I3f22716575af96aea884bd481c023d394a0b00a5
2016-10-26 10:59:56 +00:00
Niall Bunting 08d41a2de5 Healthcheck Middleware
Use the healthcheck middleware from oslo_middleware. This adds a new
pipeline that depends if /etc/magnum/healthcheck_disable file exists.

The healthcheck middleware is avalible under the /healthcheck URL.

Return values:
200 OK (If the file does not exist)
503 DISABLED BY FILE (If file exists)

Change-Id: I23179d5285831af12de7f392849c490d86a5682e
2016-04-22 12:32:44 +00:00
Michael Krotscheck a5883fd3af Moved CORS middleware configuration into oslo-config-generator
The default values needed for magnum's implementation of cors
middleware have been moved from paste.ini into the configuration
hooks provided by oslo.config. Furthermore, these values have been
added to the default initialization procedure. This ensures
that if a value remains unset in the configuration file, it will
fallback to using sane defaults. It also ensures that an operator
modifying the configuration will be presented with that same
set of defaults.

Change-Id: I7d8f8708d53bbab117600070982ac80482fa0a77
Closes-Bug: 1551836
2016-03-09 13:02:07 -08:00
Aaron-DH db378a0ee5 Load wsgi app(api) with paste.deploy
This change replaces the hard coded WSGI app creation with a pipeline
of WSGI apps declared in a configuration file.
Paste Deploy was used to create the pipeline since it is used by many other
OpenStack projects and it is an active project
with new contributors and supports Python 3. Dependency on Paste is
localized so switching to another library would not be hard if OpenStack moves
to another package in the future.

Change-Id: I9a45f974c2c8c67a01748583639e6a6248003b85
Closes-Bug:#1551134
2016-03-08 09:25:44 +08:00