fix er_run commands

puppet exec doesn't run under a real shell, so running cd doesn't
work because it's not a command. Instead use cwd properly to
actually run these commands.

Also actually call the correct command to generate the uncategorized
jobs page.

Change-Id: I84ed19bbdc16d185316e3967efbd798e06a521d1
This commit is contained in:
Sean Dague 2014-01-23 16:33:39 -05:00
parent ff2b7a4ba9
commit a08763eaf7
2 changed files with 6 additions and 4 deletions

View File

@ -26,7 +26,7 @@ class elastic_recheck::cron () {
user => 'recheck',
minute => '*/15',
hour => '*',
command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}",
command => "cd ${er_state_path} && er_safe_run.sh ${graph_cmd}",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
require => Class['elastic_recheck']
}
@ -35,7 +35,7 @@ class elastic_recheck::cron () {
user => 'recheck',
minute => '59',
hour => '*',
command => "cd ${er_state_path}; er_safe_run.sh ${graph_cmd}",
command => "cd ${er_state_path} && er_safe_run.sh ${uncat_cmd}",
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin',
require => Class['elastic_recheck']
}

View File

@ -46,8 +46,9 @@ class elastic_recheck (
}
exec { 'run_er_graph':
command => "cd ${recheck_state_dir} && er_safe_run.sh ${graph_cmd}",
command => "er_safe_run.sh ${graph_cmd}",
path => '/usr/local/bin:/usr/bin:/bin/',
cwd => $recheck_state_dir,
user => 'recheck',
refreshonly => true,
require => File['/usr/local/bin/er_safe_run.sh'],
@ -55,8 +56,9 @@ class elastic_recheck (
}
exec { 'run_er_uncat':
command => "cd ${recheck_state_dir} && er_safe_run.sh ${uncat_cmd}",
command => "er_safe_run.sh ${uncat_cmd}",
path => '/usr/local/bin:/usr/bin:/bin/',
cwd => $recheck_state_dir,
user => 'recheck',
refreshonly => true,
require => File['/usr/local/bin/er_safe_run.sh'],