Correct the example of zuul enqueue command

Change-Id: I9d73515d796f591c4c5984834959d5625d1c61b9
Log components starts in Zuul.Server

When developping or wondering why Zuul is stuck/having a problem, I
found it very useful to know which tasks it already started.  This patch
adds a logger to the Server() class and log informational message before
most components are started.

Change-Id: I19d0d439c50b42ad6217d92654b9d5e2558d9a7f
Update trigger script for new zuul url parameter

* tools/trigger-job.py: Add a --url option which passes the required
ZUUL_URL parameter with a sane default for OpenStack Infra's
environment.

Change-Id: I2d8aa73b11b0069e31ffa599c1c9d9059919fb7a
Allow workers to send back metadata

To help with debugging, allow workers to send back information about
itself such as hostname and ips. This will allow for an RPC/Client
call to get the information on running jobs.

Change-Id: I03b553293923cd65b3a9651a8877aa23688d2909
Split the merger into a separate process

Connect it to Zuul via Gearman.  Any number of mergers may be
deployed.

Directly find the pipeline for a build when processing a result,
so that the procedure is roughly the same for build and merge
results.

The timer trigger currently requires the gerrit trigger also be
configured.  Make that explicit inside of the timer trigger so
that the scheduler API interaction with triggers is cleaner.

Change-Id: I69498813764753c97c426e42d17596c2ef1d87cf
Merger: log non Git exceptions on merge

Some git merge commands fails for me with an AssertionError coming from
GitPython:

 AssertionError: len([
    "5a0a437ee9a6fd4b30484dfdc2455c83ea00a058\t\t'refs/changes/80/111180/1'
of ssh://gerrit.wikimedia.org:29418/mediawiki/core\n"]
   )
   != len([
     'Total 10 (delta 9), reused 10 (delta 9)',
     ' * branch refs/changes/80/111180/1 -> FETCH_HEAD'
   ])

Zuul.Merger explicitly log merge exceptions at debug level, though we
should only load GitCommandError exceptions and properly log other
exceptions (such as AssertionError).

Change-Id: Idca682c0920b9e6eac3f12cc05634dfe304a0305
Separate merger/server pidfile/logging better

So that they may safely coexist on a single host.

Change-Id: I64698423670bf11051c40ad80427643dd0f3d0cd
Cancel obsolete builds on reconfiguration

Cleanup running builds for jobs that are no longer defined on
reconfiguration.

Change-Id: I746a5ba8d9034ae846fd77080af2bfabc8aedf44
Remove double accounting of builds

The "building_jobs" dictionary on pipeline managers is no longer
necessary because the object data model is sufficient to find all
of the running builds.  Remove the unnecessary second list.

Some of the protections that checked that builds were in this
dictionary are also no longer needed as it is not possible to
receive a result for a build that the running Zuul did not
request since the change to use Gearman.

Change-Id: I10de7edcf8356885f5f2d2f45d7014582bcbc3cf
Merge "Cancel obsolete builds on reconfiguration"
Merge "Remove double accounting of builds"
Register merge jobs before starting the worker

It's possible gear doesn't deal with this case gracefully.

Change-Id: Icbc79ffdad7de05df53b590ca62a7539fd62c6b5
Require gear 0.5.1

* requirements.txt: The latest release of the gear library fixes an
enqueuing/function registration order problem exposed by the recent
zuul merger fan-out implementation. Insist upon it.

Change-Id: Id2275477b12ce62fc485e5769029fe107a82b52d
Doc for project dependencies in gate

When jobs share gates, Zuul has a nice feature which is to creates
reference of the Change in every involved repositories.  That was sadly
undocumented.

Reference:

James E. Blair on openstack-infra mailing list:
http://lists.openstack.org/pipermail/openstack-infra/2014-January/000605.html

Change-Id: Ia3bd640f6a90e12192af1686547a5f4146192dbe
Merge "Log components starts in Zuul.Server"
Merge "Doc for project dependencies in gate"
Merge "Allow workers to send back metadata"
Add gear statsd support

Gear 0.5.0 added statsd support for the gear server.  Have Zuul
use it based on the existence of the same env vars Zuul uses
to configure its own use of statsd.

Change-Id: I09ea2541d1f2eff5f4fd2e0c78da2acfdc1776ab
Retry jobs after gear disconnect

If Zuul is disconnected from gearman, have Zuul retry the job.

Also, report slightly more useful status words for various kinds
of failures when able.

Change-Id: I2d0f2986199516f6251bb122ab619ac56a87ee8e
Use six.moves.urllib.parse instead of urlparse

To keep Python 3.x compatibility, use six.moves.urllib.parse
to replace urlparse.

Add six as a dependency in test_requirements.txt

Change-Id: Ia6cd042970c2d4e5d418a39e25bab32b4d93c544