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
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
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
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
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
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
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