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:
@@ -57,7 +57,7 @@ class nova::cron::archive_deleted_rows (
|
|||||||
|
|
||||||
cron { 'nova-manage db 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",
|
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,
|
user => $user,
|
||||||
minute => $minute,
|
minute => $minute,
|
||||||
hour => $hour,
|
hour => $hour,
|
||||||
|
@@ -9,7 +9,7 @@ describe 'nova::cron::archive_deleted_rows' do
|
|||||||
it 'configures a cron' do
|
it 'configures a cron' do
|
||||||
should contain_cron('nova-manage db archive_deleted_rows').with(
|
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',
|
: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',
|
:user => 'nova',
|
||||||
:minute => 1,
|
:minute => 1,
|
||||||
:hour => 0,
|
:hour => 0,
|
||||||
|
Reference in New Issue
Block a user