Skip to content

Commit a83673c

Browse files
author
Emilien Macchi
committed
crontab: ensure the script is run with shell
Some distros does not provide a default shell for Ceilometer user. We can run the crontab by force shell usage and avoid running issues. Closes-bug: #1400523 Change-Id: I3a4d5c958a4620335d062baecfc362fd758768b6
1 parent c609aff commit a83673c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

manifests/expirer.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
cron { 'ceilometer-expirer':
6363
command => $ceilometer::params::expirer_command,
64-
environment => 'PATH=/bin:/usr/bin:/usr/sbin',
64+
environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
6565
user => 'ceilometer',
6666
minute => $minute,
6767
hour => $hour,

spec/classes/ceilometer_expirer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
it 'configures a cron' do
4545
should contain_cron('ceilometer-expirer').with(
4646
:command => 'ceilometer-expirer',
47-
:environment => 'PATH=/bin:/usr/bin:/usr/sbin',
47+
:environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
4848
:user => 'ceilometer',
4949
:minute => 1,
5050
:hour => 0,

0 commit comments

Comments
 (0)