Merge lp:~thedac/charms/precise/daisy-retracer/fix-restart-script into lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk

Proposed by David Ames
Status: Merged
Merged at revision: 52
Proposed branch: lp:~thedac/charms/precise/daisy-retracer/fix-restart-script
Merge into: lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk
Diff against target: 57 lines (+5/-6)
3 files modified
config.yaml (+1/-1)
hooks/common (+1/-0)
templates/retracers-cache-restart.sh.tmpl (+3/-5)
To merge this branch: bzr merge lp:~thedac/charms/precise/daisy-retracer/fix-restart-script
Reviewer Review Type Date Requested Status
Daisy Pluckers Pending
Review via email: mp+212183@code.launchpad.net

Description of the change

Set the upstart kill timeout to give the code a chance to clean up after itself
Fix retracer-cache-restart.sh script to not delete the top level directory,
Remove references to supervisor
Default the mailto to root so the cron will run if mailto is not set

To post a comment you must log in.

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-03-19 18:19:12 +0000
3+++ config.yaml 2014-03-21 15:49:39 +0000
4@@ -115,7 +115,7 @@
5 type: string
6 description: Region deploying to. Used by nrpe to define servicegroup
7 mailto:
8- default: ''
9+ default: 'root'
10 type: string
11 description: Where to send mail on failure.
12 max-disk-usage-pct:
13
14=== modified file 'hooks/common'
15--- hooks/common 2013-10-08 15:08:57 +0000
16+++ hooks/common 2014-03-21 15:49:39 +0000
17@@ -75,6 +75,7 @@
18 description "error tracker retracer for $arch"
19 respawn
20 respawn limit 5 60
21+kill timeout 180
22 env PYTHONPATH=$LOCAL_CONFIG_LOCATION:$CODE_LOCATION:$APPORT_LOCATION:$DEPLOY_ROOT
23 export PYTHONPATH
24 env PATH=$APPORT_LOCATION/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
25
26=== modified file 'templates/retracers-cache-restart.sh.tmpl'
27--- templates/retracers-cache-restart.sh.tmpl 2014-03-20 23:17:46 +0000
28+++ templates/retracers-cache-restart.sh.tmpl 2014-03-21 15:49:39 +0000
29@@ -11,7 +11,7 @@
30 lockfile='/var/lock/retracers-cache-restart.lock'
31 max_disk_usage_pct=${MAX_DISK_USAGE_PCT}
32 restart_flag='/tmp/retracers_last_restart.flag'
33-maintenance_file="${VAR_DIR}/supervisor-maintenance.txt"
34+maintenance_file="${VAR_DIR}/retracer-cache-maintenance.txt"
35
36 log()
37 {
38@@ -49,9 +49,7 @@
39
40 if [[ $run_cleanup -eq 1 ]]; then
41 touch ${maintenance_file}
42- log "Shutting down retracers and supervisord"
43- # Sometimes it can hang waiting to be stopped so restart first which seems
44- # to do the trick.
45+ log "Shutting down the retracers"
46 for x in $(ls /etc/init/retracer-*); do
47 job=$(basename $x | sed s/.conf//)
48 status $job | grep -qs running && sudo stop $job
49@@ -88,7 +86,7 @@
50 set -e
51
52 log "Cleaning up cache directories"
53- find $CACHE_DIR -maxdepth 2 -name "cache*" -type d -print0 | xargs --null --no-run-if-empty rm -rf
54+ find $CACHE_DIR -maxdepth 2 -name "cache-*" -type d -print0 | xargs --null --no-run-if-empty rm -rf
55
56 # XXX: LP#991696
57 log "Cleaning out tmp directories"

Subscribers

People subscribed via source and target branches

to all changes: