Merge lp:~abentley/charms/precise/juju-reports/full-path-ini into lp:~juju-qa/charms/precise/juju-reports/trunk

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 28
Proposed branch: lp:~abentley/charms/precise/juju-reports/full-path-ini
Merge into: lp:~juju-qa/charms/precise/juju-reports/trunk
Diff against target: 29 lines (+4/-4)
2 files modified
hooks/common.py (+1/-1)
templates/crontab.tmpl (+3/-3)
To merge this branch: bzr merge lp:~abentley/charms/precise/juju-reports/full-path-ini
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+219228@code.launchpad.net

Description of the change

Always use the production.ini in the project root. Otherwise, scripts invoked from the crontab will use /lib/python2.7/site-packages/jujureports-0.0-py2.7.egg/production.ini

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common.py'
2--- hooks/common.py 2014-05-09 16:18:57 +0000
3+++ hooks/common.py 2014-05-12 16:11:25 +0000
4@@ -54,7 +54,7 @@
5
6 def call_script(script_path):
7 env = os.environ.copy()
8- ini = os.path.join(PROJECT_DIR, INI)
9+ ini = get_ini_path()
10 env['HOME'] = HOME
11 env['INI'] = ini
12 subprocess.check_call([script_path], env=env, cwd=PROJECT_DIR)
13
14=== modified file 'templates/crontab.tmpl'
15--- templates/crontab.tmpl 2014-05-07 16:03:20 +0000
16+++ templates/crontab.tmpl 2014-05-12 16:11:25 +0000
17@@ -2,9 +2,9 @@
18 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
19 $error_email
20
21-*/$interval * * * * ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/jujuci.py
22-*/$interval * * * * ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/charm_testing.py
23+*/$interval * * * * ubuntu INI=$reports_home/production.ini $reports_home/bin/python $reports_home/jujureports/jobs/jujuci.py
24+*/$interval * * * * ubuntu INI=$reports_home/production.ini $reports_home/bin/python $reports_home/jujureports/jobs/charm_testing.py
25 # The weekday below should match the value scorecard.collection_day
26 # in the file production.ini in lp:juju-reports.
27-0 16 * * 0 ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/scorecard.py
28+0 16 * * 0 ubuntu INI=$reports_home/production.ini $reports_home/bin/python $reports_home/jujureports/jobs/scorecard.py
29 #0 0 * * 1 ubuntu INI=production.ini $reports_home/bin/python $reports_home/jujureports/jobs/cabs.py

Subscribers

People subscribed via source and target branches

to all changes: