Sean Dague 74c68501bc add in elastic-recheck-unclassified report
this adds the new elastic-recheck-unclassified report, which
generates an html page of all the unclassified gate failures.

it also runs this command, and the elastic-recheck-graph command
not only on cron, but also on updates to the repository. In order
to do this safely, we create a new er_safe_run.sh in /usr/local
that provides a flock front end to ensure we won't race on our
html writes.

Change-Id: I624f2629e2ac19a1394866f73f1aa9ba18e968ce
2014-01-21 18:29:30 -05:00

43 lines
1.5 KiB
Puppet

# Copyright 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2014 Samsung Electronics
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Class to install and configure an instance of the elastic-recheck
# service.
#
class elastic_recheck::cron () {
$er_state_path = $::elastic_recheck::recheck_state_dir
$graph_cmd = $::elastic_recheck::graph_cmd
$uncat_cmd = $::elastic_recheck::uncat_cmd
cron { 'elastic-recheck':
user => 'recheck',
minute => '*/15',
hour => '*',
command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
require => Class['elastic_recheck']
}
cron { 'elastic-recheck-uncat':
user => 'recheck',
minute => '59',
hour => '*',
command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
require => Class['elastic_recheck']
}
}