Commit Graph

529 Commits

Author SHA1 Message Date
Andreas Jaeger 998fb7401c Retire repo
This repo was created by accident, use deb-python-oslo.service
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:40:01 +02:00
OpenStack Proposal Bot bde278f0b1 Updated from global requirements
Change-Id: I6c8a8cf4140574d53eefbae6e9338eee18ed95c1
2016-08-04 02:40:56 +00:00
OpenStack Proposal Bot 0c3a29d139 Updated from global requirements
Change-Id: I23d935752613451fb3fb4716fa153c0bddf3ea23
2016-07-29 02:34:05 +00:00
yan.haifeng aac1d89dca Fix parameters of assertEqual are misplaced
Many assertEqual sentences don't follow assertEqual(expected, actual),
this patch fix all of them.

Closes-Bug: 1604213
Change-Id: Ice72233f41d2ee1a32ef1be7ff65a8a2ea19c508
2016-07-20 16:42:28 +08:00
OpenStack Proposal Bot 3f39b9bd6c Updated from global requirements
Change-Id: I487c94ab3adb90b72913863ca2701dc87e1af32f
2016-07-09 19:26:06 +00:00
OpenStack Proposal Bot 642127317b Updated from global requirements
Change-Id: I1697e8532610b73c0b900a105a683fccd3f77faf
2016-07-09 03:16:25 +00:00
OpenStack Proposal Bot 84b53e6bcf Updated from global requirements
Change-Id: I752fdfdbefb94498e36092de80003dfc13e28912
2016-06-30 18:48:38 +00:00
OpenStack Proposal Bot e7317d7f44 Updated from global requirements
Change-Id: Ia9e72128ca8fb376a7e11399a55576713fc87f35
2016-06-21 18:04:39 +00:00
OpenStack Proposal Bot 33d8b1096d Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: If3dada90f702c6c50fe1e495f5982fda12e882be
2016-06-04 07:07:59 +00:00
OpenStack Proposal Bot 241e19661b Updated from global requirements
Change-Id: Ia82b3b9aebb94f62ba4c8afc1a8801114db8ffdc
2016-06-03 18:18:14 +00:00
OpenStack Proposal Bot d8f46bc74b Updated from global requirements
Change-Id: Ib42132654f642021252e59e10188c01711e364b9
2016-06-01 13:53:27 +00:00
OpenStack Proposal Bot 9143d0cb14 Updated from global requirements
Change-Id: Ia220f15c252b10c549045cb114257cf46b8d5e41
2016-05-31 03:05:32 +00:00
OpenStack Proposal Bot 1083a7f242 Updated from global requirements
Change-Id: I8785c5d071d245d85438ba90019dd38c2e5000eb
2016-05-30 00:38:28 +00:00
OpenStack Proposal Bot 14eda53c74 Updated from global requirements
Change-Id: I93df868b8ea44843624d419e6cf321ae4f09ae6d
2016-05-26 17:04:09 +00:00
OpenStack Proposal Bot 2e106c6fc1 Updated from global requirements
Change-Id: Ie3c9809458923c7968cf5096d4c55267a42886dc
2016-05-19 18:47:20 +00:00
ChangBo Guo(gcb) 43343b4445 Trivial: ignore openstack/common in flake8 exclude list
The directory openstack/common doesn't exist any more.
So remove it from flake8 exclude list.

Change-Id: Ia66d614e14fbda77df022be339eb9efb12d7af59
2016-05-11 20:46:45 +08:00
Jenkins 760abb6de4 Merge "[Trivial] Remove executable privilege of doc/source/conf.py" 2016-05-05 20:54:48 +00:00
Jenkins 1a51c97b7d Merge "Offer mutate_config_files" 2016-05-04 15:59:58 +00:00
Jenkins 071f4445df Merge "Make _spawn_service more flexible" 2016-05-04 13:50:13 +00:00
ZhiQiang Fan b83ec523b4 [Trivial] Remove executable privilege of doc/source/conf.py
It is a configuration file, rather than a script.

Change-Id: Ie5bf4a871938873fe5300a28ddadfde33323951f
2016-04-29 20:15:35 +08:00
OpenStack Proposal Bot 96ccba8416 Updated from global requirements
Change-Id: I0272852f8b92ae7b43f7a4b6a5304104aed5599a
2016-04-28 16:16:20 +00:00
Alexis Lee 8f6383481b Offer mutate_config_files
This patch adds a 'restart_method' parameter to Launcher. When set to
'reload' (the default), behavior is as today. If a service chooses
'mutate' then when a SIGHUP is received, mutate_config_files is called
instead of reload_config_files. This means the 'mutable' flag on
options will be respected.

Change-Id: Icec3e664f3fe72614e373b2938e8dee53cf8bc5e
Depends-On: I9bb2ff39dc1ed0a63bd7e7635704b34c53d32d79
2016-04-28 11:06:20 +01:00
Alexis Lee 1393c85f32 Make _spawn_service more flexible
I need to tweak the launcher used, as it stands this isn't possible.
Also I find it ugly muddling the service arguments with the
_spawn_service arguments.

Pass in constructors for each of these. This allows us to pass
whatever arguments, set up extra things, whatever we want. It's
important that at least the launcher is created in the child process
so we can't pass in objects.

This patch also fixes Launcher.launch_service to accept a workers
argument (which must be 1 or a ValueError will be raised). This makes
ServiceLauncher.launch_service compatible with
ProcessLauncher.launch_service, avoiding awkward "if isinstance" or
"if workers == 1" logic when you're not sure of the type of the
launcher.

Change-Id: Ia309828c0c7e7599d4b82994dd36165106dc6513
2016-04-28 11:01:35 +01:00
Joshua Harlow c8499ee28a Remove direct dependency on babel
The dependency on oslo.i18n already forces this requirement.

Change-Id: Ib4386bcb61c95d3a9db96ae08a1d9ecfccd344e8
2016-04-18 13:31:27 -07:00
OpenStack Proposal Bot aa969d3197 Updated from global requirements
Change-Id: Iddcfa71f8ade7c40f08527691c12afbfa93add5d
2016-04-13 12:47:42 +00:00
OpenStack Proposal Bot a0e4a068a5 Updated from global requirements
Change-Id: Ic412fead6397670ac7e1f94352038f380d0b3c3d
2016-04-08 11:47:50 +00:00
OpenStack Proposal Bot 9a2e79226b Updated from global requirements
Change-Id: I472ad19732eac8dc819fe179c478ecee37552392
2016-04-08 00:32:21 +00:00
OpenStack Proposal Bot 2996051eb2 Updated from global requirements
Change-Id: I064132463e8b3aa18460d0b9e724df2720892be9
2016-04-07 17:13:28 +00:00
Alberto Murillo 63c62f201a Fix argument type for _sd_notify() on python3
socket.sendall() expects a byte-string as
argument but takes its from _sd_notify in
a string format causing an exception on python3

Closes-Bug: #1564150

Change-Id: I16de988739b9e37b8b2721fefd3c6be485e5a4c7
2016-03-31 10:51:19 -06:00
Joshua Harlow 9604fc9c43 Use a timeutils.StopWatch for cancel timing
Instead of using time.time and such directly the
oslo utils timeutils code provides a handy timer that
itself uses monotonic time (so it won't be affected
by time shifts) so prefer to use that for the timer like
code that exists in this new cancel code.

Change-Id: Ie41f8e90cf1cb3f62fd0def00b0bc7068acd2c40
2016-03-17 09:46:12 -07:00
Jenkins 18b0f38945 Merge "Add ability to cancel Threads and ThreadGroups" 2016-03-17 16:38:05 +00:00
Jason Dunsmore c2e6478761 Add ability to cancel Threads and ThreadGroups
Change-Id: I4d5eb361fd1820b4fe8501df6fe2a03c49e816b3
Partial-Bug: #1536451
2016-03-10 08:16:00 -06:00
zwei 9b82953871 Exception: message need '_' function
eventlet_backdoor.py
    loopingcall.py
    service.py

Change-Id: I41bf13a2c6afddbffe30ff36134c4a42eaa2ccf1
2016-03-09 13:07:23 +08:00
Davanum Srinivas 6a56ec63bf Fix Heartbeats stop when time is changed
eventlet's hub mechanism defaults to using time.time for figuring
out how long to sleep, when to wake up etc:
https://github.com/eventlet/eventlet/blob/master/eventlet/hubs/epolls.py#L37
https://github.com/eventlet/eventlet/blob/master/eventlet/hubs/hub.py#L344

So if you mess with the system time, anything using loopingcall
will stop working. Best example as described in the bug is
`nova-manage service list` which fails for some services when
the clock is advanced.

If we use a monotonic timer, then we can get past this problem.
In this review we use the EVENTLET_HUB hook to specify
a custom Hub. In our custom Hub, we just delegate to the
existing hub mechanism (get_default_hub()) to create an
instance of the Hub and override the clock with one based
on monotonic.

Note that use_hub() mechanism will not work because that sets
the Hub just for the current thread and will not work for other
threads that may be started later. In order to set this
environment variable early, we set it in the __init__.py so
anyone who uses oslo service will enable this support just
by a simple import referencing anything in oslo.service

Co-Authored-By: Victor Stinner <vstinner@redhat.com>
Closes-Bug: 1510234
Change-Id: I4c1cf223e9f6faa1e6dcaf432be1aa709072a343
2016-03-03 21:21:02 +01:00
OpenStack Proposal Bot 58af2f32e1 Updated from global requirements
Change-Id: I091d484897871d73d335c48f8b07ee522e9431b3
2016-02-26 01:52:38 +00:00
OpenStack Proposal Bot c2288f282b Updated from global requirements
Change-Id: I68a6d5da8c2f8e6506de07377f90d31810941008
2016-02-24 08:36:35 +00: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
OpenStack Proposal Bot 01d747aa95 Updated from global requirements
Change-Id: I3dc64d81e3366e85b83cb821828083e5eba05cc6
2016-02-20 21:59:46 +00:00
OpenStack Proposal Bot 0f9f072474 Updated from global requirements
Change-Id: I046a28a6bb7df3754e009105a2a6a5a992146343
2016-02-19 18:55:47 +00: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
OpenStack Proposal Bot de959dc78f Updated from global requirements
Change-Id: I900426258b26f9b9efae48dba92f11138da87a7a
2016-02-16 18:16:59 +00:00
Jenkins 88415cee16 Merge "Fix misspelling and rewrite sentence" 2016-02-15 02:24:18 +00:00
Jenkins e960343b5e Merge "Add a more useful/detailed frame dumping function" 2016-02-15 02:21:34 +00:00
Elena Ezhova d94735ba25 Use requests in TestWSGIServerWithSSL instead of raw socket client
It seems that since some of the latest eventlet releases (0.18.2
most likely) sock.read() returns a single line, not the whole
response as the tests expected.

There's no discernable reason why we need to use a raw
eventlet-based client TestWSGIServerWithSSL to confirm that a
wsgi server is listening correctly and returning the expected
response, especially since using eventlet leads to unreliable
i/o on the socket unless there is an explicit yield before
asserting the value of the response.

So requests is used to query the servers and verify the response.

Based on the nova review: https://review.openstack.org/#/c/278089

Change-Id: Iff4ea2b00e50f6928a22ac2309e77b8bafade087
2016-02-11 16:21:55 +03:00
OpenStack Proposal Bot 6cd9c81ef8 Updated from global requirements
Change-Id: Id511624b510148745b57eb50f59887708d06cf0c
2016-02-07 00:17:49 +00:00
Jenkins 843879c068 Merge "Fix test execution on CentOS 7" 2016-02-05 03:47:17 +00:00