Merge lp:~adeuring/charms/precise/juju-reports/config-cloud-health-script into lp:~juju-qa/charms/precise/juju-reports/trunk

Proposed by Abel Deuring
Status: Merged
Merged at revision: 47
Proposed branch: lp:~adeuring/charms/precise/juju-reports/config-cloud-health-script
Merge into: lp:~juju-qa/charms/precise/juju-reports/trunk
Diff against target: 55 lines (+13/-2)
3 files modified
config.yaml (+6/-0)
hooks/common.py (+6/-2)
templates/crontab.tmpl (+1/-0)
To merge this branch: bzr merge lp:~adeuring/charms/precise/juju-reports/config-cloud-health-script
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+241280@code.launchpad.net

Description of the change

Updates for the script "cloud-heath":

  - New entry in the crontab template
  - new config parameter "cloud-health-failure-threshold"

I am not 100% sure what the best time to start the script is: The cloud health builds are started at *:45 and run typically less than 5 minutes; azure tests need typically up to 10 or 12 minutes.

Builds from most jobs can occasionally run for more than 20 minutes, meaning that the most build (that will likely be a failure) will not be noticed for another hour. OTOH, waiting longer just for the rare longer running jobs does not make much sense either.

Another option would be to start the script three or four times per hour, for example, at minutes 15, 35, 55.

To post a comment you must log in.
48. By Abel Deuring on 2014-11-10

nonsensical crontab spec fixed.

Revision history for this message
Aaron Bentley (abentley) wrote :

Thanks for testing. Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2014-08-20 17:02:22 +0000
3+++ config.yaml 2014-11-10 16:07:45 +0000
4@@ -56,3 +56,9 @@
5 type: string
6 default: ""
7 description: "The build token for the charm-bundle-test job."
8+ cloud-health-failure-threshold:
9+ type: string
10+ default: ""
11+ description: |
12+ The failure thresholds for cloud health jobs.
13+ A space-separated list of job-name:failure-threshold pairs.
14
15=== modified file 'hooks/common.py'
16--- hooks/common.py 2014-11-03 15:30:04 +0000
17+++ hooks/common.py 2014-11-10 16:07:45 +0000
18@@ -35,7 +35,7 @@
19
20
21 def install_ini(mongo_url, gh_token, jujuci_url, token, error_email,
22- error_email_from):
23+ error_email_from, cloud_health_failure_threshold):
24 config = ConfigParser()
25 path = get_template_path(INI)
26 if not os.path.exists(path):
27@@ -48,6 +48,9 @@
28 config.set('app:main', 'home', HOME)
29 config.set('app:main', 'error_email', error_email)
30 config.set('app:main', 'error_email_from', error_email_from)
31+ config.set(
32+ 'app:main', 'cloud_health_failure_threshold',
33+ cloud_health_failure_threshold)
34 config.write(open(get_ini_path(), 'w'))
35 return config
36
37@@ -276,7 +279,8 @@
38 return
39 ini = install_ini(mongo_url, config['gh-token'], config['jujuci-url'],
40 config['charm-bundle-test-token'],
41- config['error-email'], config['error-email-from'])
42+ config['error-email'], config['error-email-from'],
43+ config['cloud-health-failure-threshold'])
44 configure_s3(config)
45 unset = [key for key in [
46 'lp-key', 'lp-oauth', 'gh-token', 'charm-bundle-test-token',
47
48=== modified file 'templates/crontab.tmpl'
49--- templates/crontab.tmpl 2014-08-25 14:31:49 +0000
50+++ templates/crontab.tmpl 2014-11-10 16:07:45 +0000
51@@ -11,3 +11,4 @@
52 # in the file production.ini in lp:juju-reports.
53 0 16 * * * ubuntu update-bugs --email-logs --log-file=$logs/update-bugs.log && scorecard --email-logs --log-file=$logs/scorecard.log
54 #0 0 * * 1 ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/cabs.py
55+5 * * * * ubuntu cloud-health --email-logs --log-file=$logs/cloud-health.log

Subscribers

People subscribed via source and target branches

to all changes: