Commit Graph

19 Commits

Author SHA1 Message Date
Clark Boylan ddb310c599 Retire this project
We've shutdown the subunit2sql processors and don't need to manage them
with puppet any more.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/839235
Change-Id: Id72f597c28807684fcfc8795a93ba0dc1b7e403c
2022-04-25 09:51:59 -07:00
Jeremy Stanley e2743a3529 Register the worker daemon with systemd
When installing a custom initscript for a worker daemon, reload
systemd so it will pick that up before attempting to start the
service. Wrap it in a conditional check for Ubuntu 16.04 or later,
since earlier releases used upstart as their init instead of
systemd. Make sure the initscript template uses a distinct
"provides" key for each instance of the service as well.

This implementation is copied from the puppet-zuul module.

Change-Id: I4f7db205ac4ae29953757220dc0b9ae026ebbc71
2017-12-11 21:28:25 +00:00
Jeremy Stanley 9e2a5d4633 Install/upgrade subunit2sql safely
When installing or upgrading subunit2sql, override pip's default
upgrade strategy to avoid updating preinstalled dependencies if they
already satisfy the requirements. This in particular avoids
attempting to replace the distro package of python-netifaces by
rebuilding a newer sdist (it is not distributed as a wheel on PyPI
and needs C extensions compiled, which in turn have a lot of
build-time deps).

This implementation is copied from the puppet-zuul module.

Change-Id: I885a61527ca9938200fb965ea97ff957fed3c480
2017-12-11 21:28:24 +00:00
Matthew Treinish 35025f8df5
Move paho-mqtt package install to worker node
The paho-mqtt package is only ever needed on the worker because that is
what emits mqtt. However by putting it in init this also gets installed
on the server node. Additionally this commit adds a duplication check
around the package because it's possible that something else in another
module will conflict with paho-mqtt as we start adding mqtt to more
services.

Change-Id: Id0308d2d4d1843fcca73f459cffa2ae944bebd0c
2017-04-27 10:05:47 -04:00
Mikhail S Medvedev 4548b4114b Remove trailing slash so if-defined guard works
Both resource name in if statement and in declaration need to be exactly
the same.

Change-Id: Ie8635930e9d9520929865e59e3224819f487272a
2016-11-17 15:49:20 -06:00
Matthew Treinish 0e55e618ae Make sure global worker defs only done once
This commit makes sure that all the global definitions on the worker
class are only defined once. If we don't check for the previous
definition when running with multiple workers on a single node things
will fail.

Change-Id: I947d61f455778fe41d0a4723c99d029272d2155d
2016-07-26 15:23:45 -04:00
Matthew Treinish 34fe9cc284
Ensure worker log dir is created
This commit makes sure we create the dir that the worker tries to write
it's logs to.

Change-Id: Id899742ae3efc5e821f46aa10cc722e16d9bf8cb
2016-03-07 12:09:14 -05:00
Matthew Treinish 5025c20960
Switch /etc/logstash to /etc/subunit2sql
This commit switches the use of the /etc/logstash directory to
/etc/subunit2sql. This was a leftover from when we first got the
subunit workers up and running and it was largely a copy and paste
of the policy for the logstash workers. Changing this should make it
more clear to users and consistent with the naming of everything
else.

Change-Id: Ie425dcf53856edd873ff1d0185dcf8e4ae30e3f8
2016-03-04 15:29:15 -05:00
Matthew Treinish 50c21b8c3f
Change /etc/logstash dir ownership to root
This commit updates the /etc/logstash config dir (where the
subunit2sql configs live, which makes so much sense) to be owned by
root. There is no logstash user ever created on the worker nodes so
we shouldn't try to assign it as the owner.

Change-Id: Ifd85cf4d33c85a958aa33fca50bdd847a651e560
2016-03-04 12:02:31 -05:00
Colleen Murphy 237aa40927 Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix lint
errors caught by the puppet-lint-absolute_classname-check gem as well
as arrow alignment errors caught by the now bundle-installed
puppet-lint.

Change-Id: I6975c605e238046b3812b2fea20e65db8c890e42
2015-08-13 18:38:02 -07:00
Matthew Treinish a11d7763ce Subscribe worker service to subunit2sql package
This commit subscribes the worker daemon to the subunit2sql package
to make it restart when there is a new version released.

Change-Id: I27b2ad1ce4a02e369c52bc154670302e60bcb75f
2015-03-13 20:04:26 -04:00
Mikhail S Medvedev bf460ce2d1 Add standard puppet module files and .gitreview
This module has been split out from system-config, and additional
    files are added to create a proper puppet module.

    In addition, puppet-lint issues were fixed for manifests/*

    The spec:
    http://specs.openstack.org/openstack-infra/infra-specs/specs/puppet-modules.html

Change-Id: I0d473b48a978727b294e1329b0176641afe2f02d
2015-01-29 08:13:02 -06:00
Matthew Treinish 80a9014589 Switch subunit2sql to use decomposed uri
This commit switches the subunit2sql_uri which get's passed into the
config file template to use decomposed values. The advantage of this
is that it enables using subsets of the information elsewhere.

Change-Id: I30b5117c12897fa3a1cb1e2579b4eec59ba57b2b
2014-12-05 14:27:00 -05:00
Matthew Treinish 624e0f6662 Remove unnecessary use of logstash::indexer from subunit_worker
Previously the subunit2sql worker.pp was including the
logstash::indexer class, but this was really only done for the
/etc/logstash dir which is where the worker puts all it's files. This
commit corrects this by just ensuring the directory exists instead of
importing the other class which includes a lot of other unnecessary
things.

Change-Id: I3f00d1bb443ee0f1b2a8e9d393f46a7e9ebf148a
2014-11-18 20:07:02 -05:00
Matthew Treinish dcb20f0c7e Use correct include in worker.pp
Change-Id: Ia80729ea2669cc3c8f411284065d0745da2552df
2014-11-18 18:22:46 -05:00
Matthew Treinish ac2fce5b05 Add missing logstash import
This commit adds a missing import to the subunit2sql worker manifest.

Change-Id: I23357d9404e4a4059d0b4943ccef3ec2bd7e1539
2014-11-17 20:24:05 -05:00
Matthew Treinish ede7123001 Move worker pieces that are only need once to init.pp
This commit moves all the pieces from worker.pp which are used by all
the worker process into init.pp. This was not done before because the
package definitions would conflict with those in logstash.o.o's
manifest. However with the if not defined checks we can have them in
init.pp, so let's move everything in there.

Change-Id: I5048604ce64bb52f463397c6a37b4a19a0bab8bb
2014-11-17 18:57:58 -05:00
Matthew Treinish 4d0b971483 Ensure we only define subunit worker packages once
We can only declare the packages once per node, but since we spin up
multiple workers per node, the definitions were being duplicated. This
fixes the worker.pp file to ensure we only define packages once.

Change-Id: Idc67f97b77b4f4be3864c9dacd3835bb8328d068
2014-11-17 15:55:42 -05:00
Matthew Treinish 9a06307c40 Add subunit2sql gearman workers
This adds a new gearman worker to process the subunit files from
the gate job runs. It will use subunit2sql to connect to a sql
server and process the data from the subunit file. The
log-gearman-client is modified to allow for pushing subunit jobs
to gearman, and the worker model for processsing logs is borrowed
to process the subunit files.

Change-Id: I83103eb6afc22d91f916583c36c0e956c23a64b3
2014-10-29 13:03:49 -04:00