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
=== modified file 'config.yaml'
--- config.yaml 2014-08-20 17:02:22 +0000
+++ config.yaml 2014-11-10 16:07:45 +0000
@@ -56,3 +56,9 @@
56 type: string56 type: string
57 default: ""57 default: ""
58 description: "The build token for the charm-bundle-test job."58 description: "The build token for the charm-bundle-test job."
59 cloud-health-failure-threshold:
60 type: string
61 default: ""
62 description: |
63 The failure thresholds for cloud health jobs.
64 A space-separated list of job-name:failure-threshold pairs.
5965
=== modified file 'hooks/common.py'
--- hooks/common.py 2014-11-03 15:30:04 +0000
+++ hooks/common.py 2014-11-10 16:07:45 +0000
@@ -35,7 +35,7 @@
3535
3636
37def install_ini(mongo_url, gh_token, jujuci_url, token, error_email,37def install_ini(mongo_url, gh_token, jujuci_url, token, error_email,
38 error_email_from):38 error_email_from, cloud_health_failure_threshold):
39 config = ConfigParser()39 config = ConfigParser()
40 path = get_template_path(INI)40 path = get_template_path(INI)
41 if not os.path.exists(path):41 if not os.path.exists(path):
@@ -48,6 +48,9 @@
48 config.set('app:main', 'home', HOME)48 config.set('app:main', 'home', HOME)
49 config.set('app:main', 'error_email', error_email)49 config.set('app:main', 'error_email', error_email)
50 config.set('app:main', 'error_email_from', error_email_from)50 config.set('app:main', 'error_email_from', error_email_from)
51 config.set(
52 'app:main', 'cloud_health_failure_threshold',
53 cloud_health_failure_threshold)
51 config.write(open(get_ini_path(), 'w'))54 config.write(open(get_ini_path(), 'w'))
52 return config55 return config
5356
@@ -276,7 +279,8 @@
276 return279 return
277 ini = install_ini(mongo_url, config['gh-token'], config['jujuci-url'],280 ini = install_ini(mongo_url, config['gh-token'], config['jujuci-url'],
278 config['charm-bundle-test-token'],281 config['charm-bundle-test-token'],
279 config['error-email'], config['error-email-from'])282 config['error-email'], config['error-email-from'],
283 config['cloud-health-failure-threshold'])
280 configure_s3(config)284 configure_s3(config)
281 unset = [key for key in [285 unset = [key for key in [
282 'lp-key', 'lp-oauth', 'gh-token', 'charm-bundle-test-token',286 'lp-key', 'lp-oauth', 'gh-token', 'charm-bundle-test-token',
283287
=== modified file 'templates/crontab.tmpl'
--- templates/crontab.tmpl 2014-08-25 14:31:49 +0000
+++ templates/crontab.tmpl 2014-11-10 16:07:45 +0000
@@ -11,3 +11,4 @@
11# in the file production.ini in lp:juju-reports.11# in the file production.ini in lp:juju-reports.
120 16 * * * ubuntu update-bugs --email-logs --log-file=$logs/update-bugs.log && scorecard --email-logs --log-file=$logs/scorecard.log120 16 * * * ubuntu update-bugs --email-logs --log-file=$logs/update-bugs.log && scorecard --email-logs --log-file=$logs/scorecard.log
13#0 0 * * 1 ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/cabs.py13#0 0 * * 1 ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/cabs.py
145 * * * * ubuntu cloud-health --email-logs --log-file=$logs/cloud-health.log

Subscribers

People subscribed via source and target branches

to all changes: