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:
parent
34437ba182
commit
8897ab5908
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user