crontab: ensure the script is run with shell

Some distros does not provide a default shell for Nova user.
We can run the crontab by force shell usage and avoid running
issues.

Change-Id: Id222c943ac2f0957e1354a739ca42dde1162d1ae
This commit is contained in:
Emilien Macchi 2014-12-09 10:56:04 -05:00
parent 34437ba182
commit 8897ab5908
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ class nova::cron::archive_deleted_rows (
cron { 'nova-manage db archive_deleted_rows':
command => "nova-manage db archive_deleted_rows --max_rows ${max_rows} >>/var/log/nova/nova-rowsflush.log 2>&1",
environment => 'PATH=/bin:/usr/bin:/usr/sbin',
environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
user => $user,
minute => $minute,
hour => $hour,

View File

@ -9,7 +9,7 @@ describe 'nova::cron::archive_deleted_rows' do
it 'configures a cron' do
should contain_cron('nova-manage db archive_deleted_rows').with(
:command => 'nova-manage db archive_deleted_rows --max_rows 100 >>/var/log/nova/nova-rowsflush.log 2>&1',
:environment => 'PATH=/bin:/usr/bin:/usr/sbin',
:environment => 'PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh',
:user => 'nova',
:minute => 1,
:hour => 0,