use queries directory instead of file for elastic-recheck

moving elastic-recheck to a queries directory instead of a file
means we need to make the graphs support that. Also refactor out
the er_state_dir to make changing that easier when we pull in the
web console.

2Bupdate elastic-recheck bot config to use queries directory

Change-Id: Ifcc71511c066e8aee5cb74e013555c628f270e29
This commit is contained in:
Sean Dague 2013-12-01 16:50:48 -05:00
parent ecdb2ced59
commit 6074bb47b9
2 changed files with 3 additions and 2 deletions

View File

@ -10,5 +10,5 @@ log_config=/etc/elastic-recheck/logging.config
[gerrit]
user=<%= gerrit_user %>
host=<%= gerrit_host %>
query_file=/etc/elastic-recheck/queries.yaml
query_file=/etc/elastic-recheck/queries
key=<%= gerrit_ssh_private_key %>

View File

@ -8,6 +8,7 @@ class openstack_project::static (
$releasestatus_prvkey_contents = '',
$releasestatus_pubkey_contents = '',
$releasestatus_gerrit_ssh_key = '',
$er_state_dir = '/srv/static/status/elastic-recheck',
) {
class { 'openstack_project::server':
@ -365,7 +366,7 @@ class openstack_project::static (
user => 'recheck',
minute => '*/15',
hour => '*',
command => 'elastic-recheck-graph /opt/elastic-recheck/queries.yaml -o /srv/static/status/elastic-recheck/graph-new.json && mv /srv/static/status/elastic-recheck/graph-new.json /srv/static/status/elastic-recheck/graph.json',
command => "elastic-recheck-graph /opt/elastic-recheck/queries -o ${er_state_dir}/graph-new.json && mv ${er_state_dir}/graph-new.json ${er_state_dir}/graph.json",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
require => [Vcsrepo['/opt/elastic-recheck'],
User['recheck']],