Commit Graph

9 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
Colleen Murphy bb2f9fc027 Use instance variables in puppet template
Using local ruby variables in puppet ERB templates was deprecated in
puppet 3 and doesn't work any more in puppet 4. Access these values as
ruby instance variables instead.

Change-Id: I6ea7b30d7a890b73f8a4ce6572751d0ecfb35667
2018-04-26 21:45:46 +02: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
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 d286d9f63d Add option to disable uneccesary data migration
The latest subunit2sql migration includes a data migration to extract
the microseconds from timestamps into a separate column. However, the
infra DB for this has already stripped out all the microsecond data
from the timestamps, making running that part of the migration
unnecessary. This commit adds the flag to the template subunit2sql
config file so that we don't run that and just use the default value,
0, for the new columns, which should save a significant amount of time
when running the migration.

Change-Id: Idf32b883babc79cabe3da1d38e3f7ddd5c4127de
2015-03-06 15:23:05 -05:00
Matthew Treinish afc25cba89 Add backup before running db migrations
Previously on new subunit2sql releases we would automatically run the
db upgrade command to cover any potential db migrations added in the
new release. However if there is a potential issue with a new migration
this could potentially corrupt the db. So to offset this risk this
commit runs a mysqldump to backup the db before we run the migration
command so in case things go bad we can restore the db from the backup.

Change-Id: I65d300699c457aeb4ead86c08077f7495eb24ed4
2015-03-05 19:22:22 -05: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 94be2380a3 Add /usr/local/bin to subunit-worker init PATH
Change-Id: I5f776cd9b1df64878b25c45594b5159d6b16d631
2014-11-18 20:52:37 -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