Commit Graph

49 Commits

Author SHA1 Message Date
Clark Boylan 278862b3f2 Retire this repo
The opendev project has been moving away from puppet and this is one of
the puppet modules that is no longer used. To simplify things for us we
are taking the extra step of retiring this repo.

Change-Id: I1d3a8a3999e75be00844a314fa7f52c37e28f9d4
2022-02-17 13:02:43 -08:00
Jeremy Stanley 63126bdbb8 Make v3 pidfile directory creation dynamic
Addition of Zuul v3 initscripts raced the dynamic pidfile directory
creation fix Idfd5d19e5171278b9bb7005edb4ae927a01f3615. Port it to
them so that if the PIDFILE variable is overridden for a custom
path, we create the correct parent directory.

Change-Id: I3af4e0eb280eed5dfeab909ad4e3fb24ede75a5a
2020-01-21 22:51:37 +00:00
Clark Boylan ebdb5fa51a Log github3 at DEBUG level
We are figuring out some github API interaction slowness and additional
api logging will help tremendously.

Change-Id: I80959b31d0fb8200a924d689e1bc27b9cde0ca31
2019-02-12 14:29:04 -08:00
Paul Belanger 9f5d36b007
Stop deleting PIDFILE on stop
This is no longer needed as if zuul is properly configured, will
create / delete the pidfile directly.

Change-Id: I51e100a293411695a31d438b5450e52498df7800
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-07-27 17:22:37 -04:00
Clark Boylan 7f61fc38b0 Configure cherrypy logging
Now that zuul-web runs with cherrypy we need to update our logging to
include cherrypy logs. We start by only including errors for now.

This is based on the config details at:
https://docs.cherrypy.org/en/latest/basics.html#play-along-with-your-other-loggers

Change-Id: I870da2272f8cfe5ed0a862e5ac6aa1920ddaa2f7
2018-06-04 13:01:57 -07:00
David Shrewsbury 9c2fcbd8a4 Remove 'restart' for v3 executor
The proper way to shutdown the executor is to issue a 'stop' and then
wait for the executor to finish its current jobs before issuing a
'start'. Doing 'restart' doesn't ever seem to be the right thing to
do, so prevent folks from doing that.

Change-Id: I2630306a7290092c3e59f4be01a82950927bf60b
2018-02-07 10:13:50 -05:00
Zuul a7d59a62f0 Merge "Update fingergw init script for command socket" 2018-01-17 19:56:44 +00:00
Zuul 8bf71446c4 Merge "Update merger / scheduler init script for zuulv3" 2018-01-16 15:18:29 +00:00
David Shrewsbury 2b3a4842ea Update fingergw init script for command socket
The zuul-fingergw in zuulv3 accepts the 'stop' command to stop
the daemon. This is the only valid way to stop it.

Change-Id: I86ac10c3a4d3af594fd32a5c0e316d626abf5a5e
2018-01-16 09:44:58 -05:00
David Shrewsbury b74b0ace12 Start executor as 'zuul' user
No longer need to start as 'root'.

Depends-On: I6df685044c4ce81fd263043adba832609da100af
Change-Id: Ib36b6b45bb4ca147f6649a81edde2b9577d2604c
2018-01-10 13:34:43 -05:00
Clark Boylan b513d9845e Don't assume pidfile location
When configuring the dir for the pidfiles in our init scripts don't
assume the path is /var/run/$NAME. The defaults are now /var/run/zuul
now and could be set to other values as well. Instead of assuming
/var/run/$NAME we instead take the dirname of $PIDFILE and configure
whatever that dir is instead.

Change-Id: Idfd5d19e5171278b9bb7005edb4ae927a01f3615
2018-01-03 09:26:43 -08:00
James E. Blair 22c76841cb Add support for zuul-fingergw
This is a new service which centrally proxies log streaming.

Change-Id: I1129be61c0a77dbd46e402204ea8c4da2889b016
2017-12-21 13:20:36 -08:00
Paul Belanger 701acbfdbf
Update merger / scheduler init script for zuulv3
Zuulv3 now suport command socket to stop both merger and schedulers,
add logic to install new init scripts for them depending on zuulv2 or
zuulv3.

Change-Id: Iecc8c03896c145d29e42e6be6194d7db893c8515
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-12-07 15:31:05 -05:00
James E. Blair 6c306a2433 Add kazoo info logging
This provides information on connection state.

Change-Id: I03266e4e15697862bc2e6592b6662317ba39dcc8
2017-09-28 09:41:06 -07:00
Monty Taylor be57d371d8
Revert "Add debug logging for cachecontrol library"
This reverts commit 4e5378c264.

Change-Id: I1462a7cc9b7b2a6a1974ef13998d2310740ce2b8
2017-09-11 18:08:49 -06:00
Monty Taylor 4e5378c264
Add debug logging for cachecontrol library
It would be nice to see hits and misses along side our other things.

Change-Id: Idcd6261ca5e27d73eb9aff0d3cc8e60fbc722b1c
2017-08-30 13:14:54 -05:00
Jenkins e498f81f3f Merge "Remove zuul-executor pid file on stop" 2017-08-21 19:57:01 +00:00
James E. Blair 2216385a8d Allow executor to core dump
ansible-playbook is getting hit with sigsegv; allow the process
to core dump so we might obtain clues.

Change-Id: Ice0bbd4abea2997ee56a92544128fd136dcef048
2017-08-17 14:50:15 -07:00
Paul Belanger 416e683a43 Remove zuul-executor pid file on stop
Otherwise this is leaked and we are not able to start zuul-executor
again.

Change-Id: I3639a74af67bfa07ad1814b7d0bc5a995e4ef14a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-17 13:58:31 -04:00
Paul Belanger 04f4d9a55d
Fix stop / restart for zuul-web init script
We don't yet have socket support for zuul-web, revert to default way
of doing this.

Change-Id: I2ec2c928c43def839d0ba8a212135d5414da9a52
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-21 10:29:10 -04:00
Jenkins ba474aa21c Merge "Run zuul-web as zuul" 2017-07-19 00:45:15 +00:00
James E. Blair d726212730 Run zuul-web as zuul
It does not need to run as root.

Change-Id: Id06623e42dd6bc963c5a0012fcd7adae78c6e666
2017-07-18 17:06:38 -07:00
Jenkins c2865118c9 Merge "Clean up zuul-scheduler init script" 2017-07-18 22:46:45 +00:00
Jenkins 4ceab2ffe9 Merge "Add support for zuul-web and scheduler connections" 2017-07-18 16:21:56 +00:00
Paul Belanger 796c154ac3
Send SIGHUP for zuul-scheduler reload
We haven't added socket support yet to zuulv3, revert to the original
way of using SIGHUP for reloading zuul-scheduler.

Change-Id: Id466ccb28ea37a3b7171237e98ea08c8db7199cd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-14 15:43:07 -04:00
Monty Taylor 3f4f1d9820
Add support for zuul-web and scheduler connections
Zuul v3 has a zuul-web service that provides web streaming and
eventually other web content. Add support for running it. Also add it to
the Apache mod_rewrite proxy info.

While we're adding things, add proxy info for plugin connections, which
should allow receiving github webhook events.

Change-Id: Ic79681b287dbd1a44469da70c680060940734f40
2017-07-12 05:26:04 -05:00
James E. Blair efa87a0fa7 Add gerrit IO logger
This reduces the log noise from gerrit -- we won't automatically
log all of the JSON values we get.

Change-Id: Ibfec14211f8c644a9c1e9104a96df5f47d5430ff
2017-06-29 10:06:33 -07:00
Colleen Murphy 220481fab4 Make services work with systemd
Without this patch, the SysV init scripts defined in this module will
not be recognized by systemd and puppet will fail to enable the
services. This is because between installing the init script and
starting the service, systemd needs to be reloaded. This patch adds a
new class to define the systemd reload. The conditional logic for
whether the reload exec should be in the catalog is defined in the
class. Then the file and service resources that depend on the reload
define their relationships to the new class rather than to the exec
resource so that the conditional logic does not have to be repeated for
every resource.

We also need to correct a bug in the init scripts themselves. The
Provides statement needs to give a unique service name, not just 'zuul'.
If it is not unique, insserv will error with "service zuul already
provided!" when systemd tries to enable the service.

Change-Id: Ica849094c6011806bdd0b205ba6b2b73856b7aa6
2017-06-17 19:53:01 +02:00
Paul Belanger 02f569bda1
Clean up zuul-scheduler init script
We didn't properly create our init script before, rebase from existing
zuul.init script.

We also need to add systemctl daemon-reload for scheduler / executor,
as we run them under xenial currently.

Change-Id: I0df2720750737fa7220c04a6d2d6506a45e2761e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-06-08 17:37:50 -04:00
Paul Belanger 534fa140b2
Start executor as root
zuul-executor will drop privileges to the zuul user.

Change-Id: I8f717a693e50a7e99c6d906860419161effc4718
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-06-07 14:09:27 -04:00
Paul Belanger 219e0d4644
Initial commit of zuul-executor
This is part of our zuulv3 effort. We want the ability to manage
zuul-executor on a server.

Change-Id: Iddac03a7187df47d2c72d957a50610f8b6a1dff5
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-06-05 17:27:57 -04:00
Clark Boylan 8015dd90b2 Add zuul-scheduler service
This is a halfway step to adding an explicit zuul::scheduler manifest to
run the zuulv3 scheduler daemon.

Change-Id: I99302505c4055559ee0ee09c42e69673aff57e97
2017-02-20 14:24:59 -05:00
James E. Blair 4283d37bc0 Use zuul-launcher stop for service stop
This is a forceful yet clean stop.  It will abort all running jobs
and return all nodes to nodepool before exiting.  Zuul will
re-launch the aborted jobs because they completed without a
result.

Change-Id: Ia98a7c47259bce3277682b49821672295aa3919a
2016-06-07 15:02:40 -07:00
James E. Blair b6a8f49107 Use the new socket command to reload zuul-launcher
It no longer accepts SIGHUP.

Change-Id: I672a945be3c9ae628a8069af6a7519b7b2e32bda
2016-05-31 10:14:19 -07:00
James E. Blair 017d3b825d Add /usr/local/bin to zuul-launcher path
That's where ansible-playbook will end up

Change-Id: Ie530c60cf822bdc8f573650cfbcefadcbb1fa2cd
2016-05-20 09:59:55 -07:00
James E. Blair ccad7ddbe1 Add support for zuul launcher
Change-Id: I814a241e3934885dcd9020b5a73e69d1aa594b8f
2016-05-12 14:50:01 -07:00
Jenkins d029c88cb7 Merge "Remove tabs from init scripts" 2015-11-16 09:54:21 +00:00
Jenkins 3a9dd689fb Merge "add notification for existing pidfile" 2015-11-15 14:18:35 +00:00
Monty Taylor 183ef31e75 Remove tabs from init scripts
In reviewing the previous change, it became clear that these files were
very tab-happy, which makes reading changes in gertty sad. Clean that
up.

Change-Id: I922fb9b427a4147dc2368577a80f06d212e20c3e
2015-11-15 09:08:50 -05:00
James E. Blair 89faadc064 Log gerrit at INFO level
This is the normally expected configuration for Zuul logging.  This
reverts commit 5f780500c374221cb537389b6db1003042be30d5 from
the system-config repo.  DEBUG level was temporarily set to help
debug a Zuul issue in production.

Of course, future changes to OpenStack's Zuul logging should be
parameterized, but even so, the value in this change should be
the default.

Change-Id: I429346047d5901ca75afa04baddc7802605010ba
2015-07-31 13:21:15 -07:00
Arkadiy Kraminsky b03adc90a8 add notification for existing pidfile
The zuul.init and zuul-merger.init puppet module files did not check if
pidfiles existed when starting both services. The pidfile's might exist
in the event that the zuul-server and merger were killed, which doesn't
clean them up. This change checks for whether those files exist and notifies
the user to run the stop command which will clean up any residual pid files.

Change-Id: Ie65fdf372f1710ab0c32d03f6b359e1860f566db
2015-07-02 16:52:05 -07:00
Fabien Boucher 5c92d1906d Manage logging configuration files (feature flag)
Add a feature flag to allow this module to manage
its own log configuration files. This feature flag is
set to false currently.

Configuration files for logging come from
system-config/openstack-project. The related system-config
change is Ic5ceb7fb23a8403a31f9db2774ddd900fd838930.

Change-Id: I76851c8672968a7581622cac8ff0062c1f50e0ef
2015-05-07 16:32:38 +00:00
Joshua Hesketh aa67e97317 Update zuul merger init script
Set the description of the zuul-merger.init to 'Zuul Merger' to
differentiate from the main zuul-server daemon.

Change-Id: I9ee914df0f98157b2710cbc2f9c29f7b41726273
2014-04-30 11:15:44 +10:00
James E. Blair 9129bc39de Add Zuul merge servers
Remove obsolete config options from zuul module.

The server and merger classes are constructed so that they
may coexist on a single server.  Also, the init section is
constructed so that it will install everything needed for
both services but without activating them (leaving maximum
flexibility for the operator).

Change-Id: I7b86fbbe4611c5edfb463a0a6944e0717f664188
2014-02-17 11:11:21 -08:00
Clark Boylan eae03877f5 Give Zuul file descriptor breathing room.
The Zuul service opens a lot of TCP connections and files resulting in
many open file descriptors. The default limit of 2048 is bumped into
regularly. Bump the limit to 8192 when starting the Zuul service to give
it breathing room to grow into.

Change-Id: I9a3aee664c1c6c6139b012fc3dc0631725f59741
2014-01-01 12:59:11 -08:00
James E. Blair 1cba754f04 Move Zuul to its own server.
Remove zuul from jenkins server.
Remove transitional zuul config.
Add an extra argument to gerrit-git-prep for the git site name, so that it
doesn't have to be the same as the review site.
Serve zuul git repos via apache.

Change-Id: I342032bcedf317c0f48ff89b773546eb2ccd08f8
Reviewed-on: https://review.openstack.org/17949
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
2012-12-16 17:25:55 +00:00
unicell 9b290bea69 Fix restart logic in zuul init script
Change-Id: I4ddd69916db4d9df036d3d674fb58847981d2758
Reviewed-on: https://review.openstack.org/13810
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2012-10-09 20:55:13 +00:00
James E. Blair 6b2bd12070 Make zuul restart graceful.
Add /var/lib/zuul so it can save the queue there.

Change-Id: I4ebb18f0502735ad18191a0dc5ddc26f6ef32e05
2012-07-06 10:41:40 -07:00
James E. Blair fe777f993a Set up Zuul init scripts.
Reload Zuul on changes to config files.

Change-Id: I7719a72b8d727490902d1226bfe1637c3f84d6d7
2012-05-31 20:56:35 +00:00