diff --git a/devstack/plugin.sh b/devstack/plugin.sh index f6e5a6dc..e1ef90b4 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -281,7 +281,7 @@ function configure_gnocchi { rm -f "$GNOCCHI_UWSGI_FILE" iniset "$GNOCCHI_UWSGI_FILE" uwsgi http $GNOCCHI_SERVICE_HOST:$GNOCCHI_SERVICE_PORT - iniset "$GNOCCHI_UWSGI_FILE" uwsgi wsgi-file "$GNOCCHI_DIR/gnocchi/rest/app.wsgi" + iniset "$GNOCCHI_UWSGI_FILE" uwsgi wsgi-file "/usr/local/bin/gnocchi-api" # This is running standalone iniset "$GNOCCHI_UWSGI_FILE" uwsgi master true # Set die-on-term & exit-on-reload so that uwsgi shuts down diff --git a/doc/source/running.rst b/doc/source/running.rst index 1880fde2..e9ffc325 100644 --- a/doc/source/running.rst +++ b/doc/source/running.rst @@ -25,7 +25,7 @@ The following uwsgi configuration file can be used:: [uwsgi] http = localhost:8041 # Set the correct path depending on your installation - wsgi-file = /usr/lib/python2.7/dist-packages/gnocchi/rest/app.wsgi + wsgi-file = /usr/local/bin/gnocchi-api master = true die-on-term = true threads = 32 diff --git a/gnocchi/rest/app.wsgi b/gnocchi/rest/app.wsgi index b7fefed1..475d9acb 100644 --- a/gnocchi/rest/app.wsgi +++ b/gnocchi/rest/app.wsgi @@ -17,6 +17,13 @@ See http://pecan.readthedocs.org/en/latest/deployment.html for details. """ + +import debtcollector + from gnocchi.rest import app application = app.build_wsgi_app() +debtcollector.deprecate(prefix="The wsgi script gnocchi/rest/app.wsgi is deprecated", + postfix=", please use gnocchi-api binary as wsgi script instead", + version="4.0", removal_version="4.1", + category=RuntimeWarning) diff --git a/releasenotes/notes/wsgi-script-deprecation-c6753a844ca0b411.yaml b/releasenotes/notes/wsgi-script-deprecation-c6753a844ca0b411.yaml new file mode 100644 index 00000000..d2739ec7 --- /dev/null +++ b/releasenotes/notes/wsgi-script-deprecation-c6753a844ca0b411.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The custom gnocchi/rest/app.wsgi is now deprecated, the gnocchi-api binary + should be used as wsgi script file. For example, with uwsgi "--wsgi-file + /usr/lib/python2.7/gnocchi/rest/app.wsgi" should be replaced by + "--wsgi-file /usr/bin/gnocchi-api".