From be59bb798a79478bc5581d3345c3d5f5af14ceea Mon Sep 17 00:00:00 2001 From: Richard Su Date: Mon, 15 Sep 2014 20:45:21 -0700 Subject: [PATCH] Fix heat purge deleted cron job The cron job was sending errors to root's mailbox. Errors are now directed to syslog. The job couldn't find heat-manage. Added PATH and included /usr/local/bin where heat-manage is located. Change-Id: I31f28ac741731018d5be7943d0a336c99a909562 Closes-Bug: 1369755 --- elements/heat-engine/install.d/20-heat-crontab | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elements/heat-engine/install.d/20-heat-crontab b/elements/heat-engine/install.d/20-heat-crontab index 9332c2ac5..76e7523eb 100755 --- a/elements/heat-engine/install.d/20-heat-crontab +++ b/elements/heat-engine/install.d/20-heat-crontab @@ -4,5 +4,7 @@ set -ue # If https://bugs.launchpad.net/heat/+bug/1239377 is ever fixed we can # configure heat to purge automatically and remove this. cat < /etc/cron.d/heat -30 * * * * heat heat-manage purge_deleted 1 +PATH=/usr/local/bin:/usr/bin:/sbin:/bin:/usr/sbin +MAILTO="" +30 * * * * heat heat-manage purge_deleted 1 2>&1 | /usr/bin/logger -t heat-purge-deleted-cron EOF