7 Commits

Author SHA1 Message Date
Ian Wienand
82c6dec4fa Disable cloud launcher cron job during CI
This takes a similar approach to the extant ansible_cron_install_cron
variable to disable the cron job for the cloud launcher when running
under CI.

If you happen to have your CI jobs when the cron job decides to fire,
you end up with a harmless but confusing failed run of the cloud
launcher (that has tried to contact real clouds) in the ARA results.

Use the "disbaled" flag to ensure the cron job doesn't run.  Using
"disabled" means we can still check that the job was installed via
testinfra however.

Convert ansible_cron_install_cron to a similar method using disable,
document the variable in the README and add a test for the run_all.sh
script in crontab too.

Change-Id: If4911a5fa4116130c39b5a9717d610867ada7eb1
2019-07-16 15:01:55 +10:00
Ian Wienand
e9ca0bc9ad Ensure lockfile dir is created for bridge.o.o
After we reboot the lockfile directory disappears.  Recreate it before
running the puppet that would create it anyway.

Change-Id: Ia0779240b9e516090237dfbe61404fab114c6d4a
2019-03-15 09:36:56 +11:00
Monty Taylor
7a18eb49e4 Add flag to disable cron for test jobs
The run_all cron running in test jobs is unawesome because it can
cause the inventory overrides we put in for the testing to get
overwritten with the real inventory. We don't want test jobs
attempting to run against real hosts.

Change-Id: I733f66ff24b329d193799e6063953e88dd6a35b1
2019-03-08 21:19:42 +00:00
Ian Wienand
97a3ab9bf3 Add statsd metrics for ansible runs
Add some coarse-grained statsd tracking for the global ansible runs.
Adds a timer for each step, along with an overall timer.

This adds a single argument so that we only try to run stats when
running from the cron job (so if we're debugging by hand or something,
this doesn't trigger).  Graphite also needs to accept stats from
bridge.o.o.  The plan is to present this via a simple grafana
dashboard.

Change-Id: I299c0ab5dc3dea4841e560d8fb95b8f3e7df89f2
2018-09-10 14:49:45 +10:00
Ian Wienand
3657cacfca Add logrotate role and rotate ansible log files
Add a logrotate role that allows basic configuration of a logrotate
configuration for a specific log-file.

Use this role in the ansible-cron and install-ansible roles to ensure
the log output they are generating is rotated.

This role is not intended to manage the logrotate package (mostly to
avoid the overhead of frequently checking package state when this is
expected to be called for multiple configuration files on a server).
We add it as a base package to our servers.

Tests are added for testinfra.

Change-Id: I90f59c3e42c1135d6be120de38e942ece608b761
2018-09-05 09:15:46 +10:00
Monty Taylor
de7fbba912
Set path in cron so we can find ansible-playbook
ansible-playbook is in /usr/local/bin which is not in the path in cron.

Change-Id: I633c021936dfbbfdb022aa3d052fe88f32d2ef6a
2018-08-21 16:55:42 -05:00
Monty Taylor
759015f101
Start running puppet cron on bridge.openstack.org
Puppet cron is no longer being run on puppetmaster (yay!) so start
running it in cron from bridge.

Change-Id: Idc579a2660a5450092544c21a2e9e6cb9688e5f9
2018-08-20 18:26:30 -05:00