Commit Graph

15 Commits

Author SHA1 Message Date
Bence Romsics 6552b9a820 Make debug option of wsgi server configurable
Because in some deployments tracebacks in API responses are unwanted
for security reasons.

Change-Id: I8a2acea7393c369bfa7d7822f21b4d40d56d6739
Needed-By: https://review.opendev.org/c/openstack/neutron/+/818391
Partial-Bug: #1951429
2021-12-21 11:23:23 +00:00
Sebastian Lohff dd174fbfde Make PID availabe as formatstring in backdoor path
When multiple processes are spawned with the same configuration
each process has the same backdoor_socket path configured and
only the first process able to bind to the socket can later be
accessed via the backdoor. To give each process a unique socket path
we now expose the PID of the process as a format string argument,
which can then be used like this:

backdoor_socket = /var/lib/neutron/backdoor-{pid}

Change-Id: I3f86f4867eb0cd5010abadf68620aa3450d3e64d
2019-05-22 16:21:44 +02:00
Jenkins de940cf464 Merge "wsgi: decrease the default number of greenthreads in pool" 2016-02-24 05:30:42 +00:00
Jenkins 9809135847 Merge "Correct some help text" 2016-02-23 16:32:49 +00:00
Brant Knudson b0fc1fd08d Correct some help text
You can get large tokens when keystone is configured to use PKI
tokens. This doesn't have anything to do with v3 or v2.0.

Change-Id: I8a571a7f6f69c1f68a1991be09db093f91c29367
2016-02-22 16:49:15 -06:00
Brant Knudson aa09a860aa Fix typo in help text
"be be" is changed to "be".

Change-Id: I6e0904fdf6a881c2198399e65bc6eeeb0d9fad81
2016-02-22 16:47:17 -06:00
Roman Podoliaka 321c185f3d wsgi: decrease the default number of greenthreads in pool
It turned out that distribution of WSGI requests between forks is not
even when eventlet is used, which can cause pool timeout issues under
load, while there are idle workers with open DB connections, which
should have served these HTTP requests.

The default number of greenthreads in pool should be decreased to allow
DB oriented services (mostly APIs) distribute load more evenly between
workers: one worker will stop accepting new requests, when there are no
more available greenthreads in the wsgi pool, accept() will block, but
there are other forks accept()'ing on the same FD to handle connections
from the queue in kernel.

Related change to oslo.db:

  I2e9c2a71d8231e0dfbefc6293ad319e1e459beec

Testing was performed using this script:

  https://gist.github.com/zzzeek/c69138fd0d0b3e553a1f

With 100 greenthreads in the pool, 50 DB connections allowed overflow
no pool timeout issues were seen with up to 500 concurrent requests
done by ab, while current default values (1000/10) could not handle
even 100 concurrent requests.

See this ML thread for details:

  http://lists.openstack.org/pipermail/openstack-dev/2015-December/082717.html

Closes-Bug: #1535375

Change-Id: I65b40b9906b75146a0085bbe168f1e6bcae82f21
2016-02-22 20:12:29 +02:00
Joshua Harlow db1fc249e6 Allow the backdoor to serve from a local unix domain socket
Local files can be made accessible to certain users vs random
ports which can be accessible to anyone on a machine so allow
using unix files as a way to start the eventlet backdoor (so that
user and group permissions common on unix are not lost).

To use this new type of files `socat` is needed (or other way
to interact with telnet over a unix domain socket).

For example (with the path at /tmp/my_special_socket):

  socat - UNIX-CONNECT:/tmp/my_special_socket

Depends-On: Ia2385879e09991102f8f305ec41dbb651a4374de

Change-Id: I7f25913168ebe5854f360db3d6310b72a56b2b4d
2016-02-18 19:24:19 -08:00
Marian Horban 1b136ad4c6 Default value of graceful_shutdown_timeout is set to 60sec
Change-Id: If054313f8866eb033fc29e4073ed8cfd6aff71d2
2015-11-10 09:15:08 -05:00
Davanum Srinivas acc9eb1e4d Support for SSL protocol and cipher controls
Add ability to explicitly specify SSL/TLS protocol
version and ciphers. We add 2 string options and
do not specify any default for backward compatability.
If the values are not specified explicitly we fall
back to the python defaults as we did before.

DocImpact

Closes-Bug: #1513581
Change-Id: I149cf569e1e5277f30e89203d20731d4482509d4
2015-11-11 01:31:38 +00:00
Marian Horban 95e09d216a Added config option graceful_shutdown_timeout
Option graceful_shutdown_timeout is responsible for interruption of
graceful shutdown if graceful_shutdown_timeout is exceeded.

DocImpact
Closes-Bug: #1446583

Change-Id: I0dfbf2d0a4943337da24c0904a1ed6f0cdccd77b
2015-10-24 12:51:49 +03:00
Marian Horban 2e2940d1e1 WSGI module was corrected
1. Deprecated SSL options were added.
2. Server class become derived from service.ServiceBase.
3. InvalidInput message was wrapped with log translator.

Change-Id: Id99b77a4f45998c158de7aa5f93f0f4afd9b5f7e
2015-09-18 08:08:58 +00:00
Marian Horban 6dd3ad50b6 Added wsgi functionality
Because of copy-pasted wsgi functionality in projects(nova, cinder,
glance, etc.) it is added to oslo.service with perspective to remove
it from other projects.
DocImpact

Change-Id: If8840168f10cc3561f4f01e6d456d6b4fd1de8b5
2015-08-19 12:01:40 +00:00
Elena Ezhova 8c56f24291 Make logging option values configurable
It is not always desirable to log full set of conf at service
start. This change adds new option "log_options" that allows to
enable or disable logging values of all registered options.

Also moved list_opts function for service submodule to service.py
as service and eventlet_backdoor opts have to be grouped together
and changed the entrypoint accordingly.

Change-Id: I2a97ebf736fd361e6f1d05796d5077bc9627ff85
Closes-Bug: #1461250
2015-06-08 11:08:45 +03:00
Elena Ezhova 3b6dc29582 Move the option definitions into a private file
bp graduate-oslo-service

Change-Id: I563c48bfc79bee931b3022a210a6e77fe14c86a8
2015-05-28 15:21:59 +03:00