From 6074bb47b907fe163f9aeabf9bbf853616a575f6 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Sun, 1 Dec 2013 16:50:48 -0500 Subject: [PATCH] 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 --- modules/elastic_recheck/templates/elastic-recheck.conf.erb | 2 +- modules/openstack_project/manifests/static.pp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/elastic_recheck/templates/elastic-recheck.conf.erb b/modules/elastic_recheck/templates/elastic-recheck.conf.erb index cea1cc3921..e28a0ef275 100644 --- a/modules/elastic_recheck/templates/elastic-recheck.conf.erb +++ b/modules/elastic_recheck/templates/elastic-recheck.conf.erb @@ -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 %> diff --git a/modules/openstack_project/manifests/static.pp b/modules/openstack_project/manifests/static.pp index 9890b30322..c4d766b45a 100644 --- a/modules/openstack_project/manifests/static.pp +++ b/modules/openstack_project/manifests/static.pp @@ -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']],