summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Provide TextJob and TextWorker for convenienceClint Byrum2017-05-152-105/+389
| | | | | | | | | | | | | | | | | | | | | These classes will provide a smoother path from python2 -> python3 when using gear, as it will relieve the need for encoding/decoding. Change-Id: I93bfe33f898294f30a82c0a24a18a081f9752354
* | | Merge "Make Job.name assume utf-8."0.8.0Jenkins2017-05-172-5/+50
|\ \ \ | |/ /
| * | Make Job.name assume utf-8.Clint Byrum2016-11-162-5/+50
| |/ | | | | | | | | | | | | This breaks the API in subtle ways, but only really for people who want to use Python 3 and/or not utf-8 function names. Change-Id: If6bfc35d916cfb84d630af59f4fde4ccae5187d4
* | Uncap pbr dependencyPaul Belanger2017-03-011-1/+1
| | | | | | | | | | | | | | With the release of pbr 2.0.0, uncap so we can use the latest version. Change-Id: I32536cc8fb2dde06971206fefee9742400b19387 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* | Update hacking dependencyPaul Belanger2017-03-011-1/+1
|/ | | | | | | | Sync with openstack global requirements for hacking. This allows us to properly use pbr 2.0.0. Change-Id: Icde44550ce50065b4f1072b65d6de0e2f7cd45c4 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* Merge "Ignore E129"Jenkins2016-11-081-2/+2
|\
| * Ignore E129James E. Blair2016-11-081-2/+2
| | | | | | | | | | | | | | | | | | This rule is not backed by the pep8 standard and should not be enforced (in fact, it is contra-indicated by the standard). It was previously covered by E125 in an earlier version of the pep8 tool, but has since split out. Change-Id: Ib9d39c44de29a633e02e36b8ddae87d5ec28d874
* | Merge "Re-enable flake8"Jenkins2016-11-086-19/+19
|\ \ | |/
| * Re-enable flake8Monty Taylor2016-11-086-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | The line in tox.ini "select=H231" did not add H231 to the list of flake8 checks. It made us only run H231. Remove the H231 line and then fix the flake8 issues. The most substantial of these was the shadowing of the queue module with local variables named queue. Made that one import queue as queue_mod because changing the variable names in the code was yuckier to look at. Change-Id: I4a26a20889132f7f4525b17392088dda6bd5bbd2
* | Move py27 after py34 and py35Monty Taylor2016-11-081-1/+1
| | | | | | | | | | | | testr database format gets wonky if you do python2 before python3. Yay. Change-Id: I8c250e8f71ce95e6224c90b9596d5a176e75626d
* | Merge "Add py35 to tox.ini default envs"Jenkins2016-11-081-1/+1
|\ \ | |/ |/|
| * Add py35 to tox.ini default envsClint Byrum2016-10-031-1/+1
| | | | | | | | | | | | | | Ubuntu 16.04 switches to this for python3, so it's good to include it in the default list that is attempted when one runs 'tox'. Change-Id: Idae2118b3179010df8a9559a059d50b1decca8e5
* | Merge "Remove discover from test-requirements"Jenkins2016-10-011-1/+0
|\ \ | |/ |/|
| * Remove discover from test-requirementsSwapnil Kulkarni (coolsvap)2016-07-221-1/+0
| | | | | | | | | | | | It's only needed for python < 2.7 which is not supported Change-Id: I582fe81f7ad07d7be1c73a4799501d5f5c5cebcc
* | Move other-requirements.txt to bindep.txtAndreas Jaeger2016-08-121-0/+0
|/ | | | | | | | | | | | | | | | | | The default filename for documenting binary dependencies has been changed from "other-requirements.txt" to "bindep.txt" with the release of bindep 2.1.0. While the previous name is still supported, it will be deprecated. Move the file around to follow this change. Note that this change is self-testing, the OpenStack CI infrastructure will use a "bindep.txt" file to setup nodes for testing. For more information about bindep, see also: http://docs.openstack.org/infra/manual/drivers.html#package-requirements http://docs.openstack.org/infra/bindep/ Change-Id: I184b552d34b0f2016a38167bd19287943f51be41
* Merge "Allow setting a timeout for Client.waitForServer()"0.7.0Jenkins2016-07-212-1/+20
|\
| * Allow setting a timeout for Client.waitForServer()Sam Thursfield2016-04-122-1/+20
| | | | | | | | Change-Id: I614de364a668b1ae01ad361254fd4afcdfe48051
* | Merge "Handle SIGINT correctly in Client.waitForServer()"Jenkins2016-07-211-1/+1
|\ \ | |/
| * Handle SIGINT correctly in Client.waitForServer()Sam Thursfield2015-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Python 2.7 threading.Condition.wait() function will block the process from responding to any signals until the condition triggers. This was especially bad for commandline applications. Before this commit, if an application didn't manage to connect to the Gearman server it would block forever and ignore CTRL+C. Adding a 'timeout' works around this issue. Behaviour is unchanged except that the 'Waiting for at least one active connection' debug message will now be logged once per second. This problem is fixed upstream in Python 3.2: <https://bugs.python.org/issue8844> Change-Id: Ib1043948b1b37a4a6732176314b8a243aad73397
* | Add test for AdminRequest.isCompleteJames E. Blair2016-07-181-0/+29
| | | | | | | | Change-Id: I16fd6b6debc3171ec9a346be079c32018e5b5f64
* | Parse admin requests 2880 times fasterJames E. Blair2016-07-171-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Both returning the incomplete data from the isComplete method, and scanning the entire incomplete string for the terminator each time are O(n^2). Also, returning the string is *very* slow, accounting for 99.6% of the speedup; scanning the string each time accounts for 0.6%. Both changes together find the terminus of a 481MiB response in about 1.6 seconds compared to 76 minutes prior to this change. Change-Id: I3614e8f3ff8ad7c3d9ca6da1b520b89cd9d5d603
* | Geard: Handle connections closed while sendingJames E. Blair2016-07-151-22/+26
| | | | | | | | | | | | | | | | | | | | If a connection is closed while sending a large amount of data, the send() call may return EAGAIN, even though the socket is in CLOSE_WAIT. In that case, just continue queuing the data, and let the main loop handle the disconnect (which it will detect via the poll call followed by a null read). Change-Id: Ib15eae81077b58d2f95fb0989ed1139c6d542f49
* | Merge "Support TCP keepalives in geard"Jenkins2016-07-122-2/+33
|\ \
| * | Support TCP keepalives in geardSagi Shnaidman2016-07-122-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support configuration of TCP keepalives in gear server. When connections are closed not gracefully they stays opened for a long time, which leads to file descriptors leak. Default values for interval, probe and count are such as in most Linux distributions. By default is disabled to keep compatibility with older versions. Change-Id: I335f68a24dda409b1a48c6e4e520ec08dfd38078
* | | List system dependencies for running common testsAndreas Jaeger2016-07-082-0/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an other-requirements.txt file containing a cross-platform list of dependencies needed for running included tox-based tests. Also include a tox environment for convenience calling the bindep[*] utility to list any missing system requirements. This change is self-testing. For other-requirements.txt see also http://docs.openstack.org/infra/manual/drivers.html#package-requirements [*] http://docs.openstack.org/infra/bindep/ Change-Id: I165b531c55a6ea27af742fcb3bd995cd4a3dce15
* | Do not encode the type (b) in the job name0.6.2Morgan Fainberg2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't encode string type in the job name in handleRequest(). Without the explicit .decode() before passing to the string formatter it would end up looking like b"b'<jobname'\t\n...." which made for working with gear on the other side near impossible because a decode of the job data would not result in a consumable string matching expected values. Now there is an explicit decode prior to formatting the string data. Change-Id: Ib2996b84bce719a2f91c166aaa4278c18f89f88f
* | Merge "Bump version requirement for pbr"0.6.1Jenkins2016-06-062-2/+2
|\ \
| * | Bump version requirement for pbrJan Kundrát2016-06-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise there's a conflict between "gear" and "turbo-hipster". Also bump hacking version because otherwise it conflicts with the pbr version. Change-Id: Ib9ef16cac16184fe6ee2ec5358b5e16480e31e15
* | | Merge "Remove vestigal hook entry from setup.cfg"0.6.0Jenkins2016-06-021-4/+0
|\ \ \
| * | | Remove vestigal hook entry from setup.cfgMonty Taylor2016-06-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | pbr stopped needing this years ago. Change-Id: I7fed19dce319162de4e0c61fd57a1cd0c48f41f3
* | | | Merge "Remove py26 from tox.ini"Jenkins2016-06-021-1/+1
|\ \ \ \ | |/ / / | | / / | |/ / |/| |
| * | Remove py26 from tox.iniMonty Taylor2016-06-021-1/+1
| | | | | | | | | | | | | | | | | | We don't support python2.6 anymore. Change-Id: I2755a7890236f48c037ac07078c732a2f53a2192
* | | Merge "Switch to six for configparser"Jenkins2016-06-022-1/+4
|\ \ \ | |/ /
| * | Switch to six for configparserPaul Belanger2016-06-022-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | I noticed fedora doesn't yet ship python3-gear so this is the main reason to add six support. Change-Id: I3d8d37870a0ab865dc0a32e123bfd16e91fa5b72 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* | | Merge "Add a test for worker termination"Jenkins2016-06-022-1/+17
|\ \ \ | |/ / |/| |
| * | Add a test for worker terminationJames E. Blair2015-12-032-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | This was an attempt to find a code path that could cause stopWaitingForJobs to raise an exception. So far, that has failed, but add this test anyway to exercise some of that code. Change-Id: I39955fc7250af9b93f336c7c3e0315528bd8d4a9
* | | Merge "Remove argparse from requirements"Jenkins2016-06-021-1/+0
|\ \ \
| * | | Remove argparse from requirementsAndreas Jaeger2016-01-201-1/+0
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | argparse was external in python 2.6 but not anymore, remove it from requirements. This should help with pip 8.0 that gets confused in this situation. Installation of the external argparse is not needed. Change-Id: Ib7e74912b36c1b5ccb514e31fac35efeff57378d
* | | Merge "Remove shebang as the script is managed by an entry_point"Jenkins2016-06-021-6/+0
|\ \ \
| * | | Remove shebang as the script is managed by an entry_pointFabien Boucher2016-02-161-6/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | The shebang is not needed in cmd/geard.py. The file is not intended to be used directly as it is managed by an entry_point. Change-Id: I4e2a8715cca81a8626f6bcd86a368a537305bc0b Signed-off-by: Paul Belanger <pabelanger@redhat.com>
* | | Merge "Add py34 to tox.ini envlist"Jenkins2016-06-021-1/+1
|\ \ \
| * | | Add py34 to tox.ini envlistClint Byrum2015-05-071-1/+1
| |/ / | | | | | | | | | | | | | | | A minor oversight, easily corrected. Change-Id: I1418bc42f56cd96ed11f1fc85a1667530d7dd495
* | | Merge "Do not change object size when iterating"Jenkins2016-06-011-2/+10
|\ \ \
| * | | Do not change object size when iteratingMorgan Fainberg2016-05-291-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `gear.Server._lostConnection()` the jobs list pulls .values() from `conn.related_jobs`, in `gear.server._removeJob()` it is possible to change the conn.related_jobs dictionary which will cause a `RuntimeError: dictionary changed size during iteration` exception to be raised in python 3 since .values() is an iterator instead of a rendered list() like in python 2. This RuntimeError is eliminated by forcing the python 2 behavior by wrapping the `.values()` call to be wrapped into an explicit list. Change-Id: I730473f3200a427cce774df534f1ff4958866dac
* | | | Merge "Deprecated tox -downloadcache option removed"Jenkins2016-06-011-1/+0
|\ \ \ \ | |/ / / |/| | |
| * | | Deprecated tox -downloadcache option removedOndřej Nový2015-12-111-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Caching is enabled by default from pip version 6.0 More info: https://testrun.org/tox/latest/config.html#confval-downloadcache=path https://pip.pypa.io/en/stable/reference/pip_install/#caching Change-Id: I6484145969bc6bf6c0824ad5487e0578bc5410be
* | | Guard against double shutdown in client0.5.9Gregory Haynes2016-01-262-5/+14
|/ / | | | | | | | | | | | | If we have already performed a shutdown we can prevent exploding when writing to self.wake_write if we short circuit. Change-Id: If5352a373d5fa61dd1ee661f4a37976b3447dd9d
* | Do not raise RetryIOError on blocked write0.5.8James E. Blair2015-06-181-2/+2
|/ | | | | | | | | | | | | | | | | | | When EAGAIN is returned on a socket write, do not raise RetryIOError. This exception is used principally to indicate that we have encountered a blocked read, and a method farther up the call stack may need to perform some cleanup. However, within the sendQueuedData method, all necessary cleanup is performed by the finally handler itself. Therefore, it is safe to ignore a blocked write, and count on either a subsequent write (which will append data to the queue and retry sending the oldest data) or the poll edge trigger to indicate that we should retry the write. There is nothing in the call stack above this method that has an exception handler for RetryIOError. Therefore, in the current state, the raised exception was causing connections to be disconnected due to the error. Change-Id: I9211fb6365f8f3b6dd0310430cf97926ce1f5d07
* Fix regression in wakeConnections0.5.7James E. Blair2015-05-071-1/+2
| | | | | | | | | | | | In d5e03ac9307c9cc6f79fc22f15e177d3662dc936, an optional argument to wakeConnections was added so that only connections related to a job would be awoken. However, the default value, None, meant that no connection would be awoken. This doesn't make much sense, and indeed, Zuul, in its unit tests, was relying on all connections being awoken. Fix this by awakening all connections if the job argument is None (which never happens within gear itself). Change-Id: Ib7632ae0353c414cc1b68dbe430cb57292058012
* Merge "Move running check in getJob"0.5.6Jenkins2015-03-261-7/+8
|\