d6ff943ae0
Gearman plugin had a race between adding jobs to the functionList and registering jobs. When registering jobs the functionMap is cleared, when adding a job the plugin checks if the job is in the function Map before running it. If we happen to trigger registration of jobs when we get a response from gearman with a job assignment then the functionMap can be empty making us send a work fail instead of running the job. To make things worse this jenkins worker would not send a subsequent GET JOB and would live lock never doing any useful work. Correct this by making the processing for gearman events synchronous in the work loop. This ensures that we never try to clear the function map and check against it at the same time via different threads. To make this happen the handleSessionEvent() method puts all events on a thread safe queue for synchronous processing. This has allowed us to simplify the work() loop and basically do the following: while running: init() register() process one event run function if processed drive IO This is much easier to reason about as we essentially only have bookkeeping and the code for one thing at a time. Change-Id: Id537710f6c8276a528ad78afd72c5a7c8e8a16ac |
||
---|---|---|
.settings | ||
src | ||
.classpath | ||
.gitignore | ||
.gitreview | ||
.project | ||
.pydevproject | ||
bsd.txt | ||
debug | ||
install-fast | ||
LICENSE | ||
pom.xml | ||
README.rst | ||
run-fast |
Overview
This plugin uses Gearman to support multiple Jenkins masters. More info can be found at https://wiki.jenkins-ci.org/display/JENKINS/Gearman+Plugin
Contributing
If you would like to contribute to the development of OpenStack, you must follow the steps in this page:
If you already have a good understanding of how the system works and your OpenStack accounts are set up, you can skip to the development workflow section of this documentation to learn how changes to OpenStack should be submitted for review via the Gerrit tool:
http://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Project site:
Patches are submitted via Gerrit at:
Bugs should be filed on StoryBoard, not GitHub:
Cloning:
License
Copyright 2013 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.