From ffd659db39c19d766adcb23068a0b18ce91d904f Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 22 Apr 2013 13:45:26 -0700 Subject: [PATCH] Escape use of '%' in cron entries. The '%' has special meaning in cron. Escape the use of this character in cron entries to allow these cron entries to run properly. Change-Id: I049a8a2a4454f99aedb7fe3017db231b8a13e569 Reviewed-on: https://review.openstack.org/27294 Approved: James E. Blair Reviewed-by: James E. Blair Tested-by: Jenkins --- modules/openstack_project/manifests/logstash.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openstack_project/manifests/logstash.pp b/modules/openstack_project/manifests/logstash.pp index 9fe205d315..cdea9d5363 100644 --- a/modules/openstack_project/manifests/logstash.pp +++ b/modules/openstack_project/manifests/logstash.pp @@ -53,7 +53,7 @@ class openstack_project::logstash ( user => 'root', hour => '5', minute => '0', - command => 'curl -XDELETE "http://localhost:9200/logstash-`date -d \'last week\' +%Y.%m.%d`/"', + command => 'curl -XDELETE "http://localhost:9200/logstash-`date -d \'last week\' +\%Y.\%m.\%d`/"', environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', } @@ -61,7 +61,7 @@ class openstack_project::logstash ( user => 'root', hour => '5', minute => '0', - command => 'curl -XPOST "http://localhost:9200/logstash-`date -d yesterday +%Y.%m.%d`/_optimize" -d \'max_num_segments=1\'', + command => 'curl -XPOST "http://localhost:9200/logstash-`date -d yesterday +\%Y.\%m.\%d`/_optimize" -d \'max_num_segments=1\'', environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin', } }