[rudder-users] [HELP] Job scheduler failed

Mikaël Mantel Mikael.Mantel at videomuseum.fr
Thu Oct 24 13:45:25 CEST 2013


Le 24/10/2013 11:31, Matthieu CERDA a écrit :
> Le 24/10/2013 10:35, Mikaël Mantel a écrit :
>> Hello guys !
>>
>> I have a rule with a directive job_scheduler.
>>
>> The respond of agent is "Error" and the output of  "cf-agent -KIb
>> job_scheduler" is :
>>
>>  >> Using command line specified bundlesequence
>> R:
>> @@jobScheduler@@result_error@@bd73b4fb-2714-4433-84ce-57c569c5e2d4@@fcd6d6de-be25-4ada-989c-d1ad20758f1a@@4@@Job@@touch 
>>
>> /root/ok2@@2013-10-18
>> 16:25:45+02:00##7e6a9aac-7b48-4ea3-84ed-526211a660e6@#Job failed on last
>> completed execution (touch /root/ok2)
>> R:
>> @@jobScheduler@@log_info@@bd73b4fb-2714-4433-84ce-57c569c5e2d4@@fcd6d6de-be25-4ada-989c-d1ad20758f1a@@4@@Job@@touch 
>>
>> /root/ok2@@2013-10-18
>> 16:25:45+02:00##7e6a9aac-7b48-4ea3-84ed-526211a660e6@#The command will
>> be run at a random time after 16:00 on this node (touch /root/ok2)
>>
>> Why ?
>>
>> And is it possible to execute commands every 5 mins (with return 
>> codes) ?
>>
>> Thanks a Lot
>
> Hello Mikaël,
>
> The error you see here means that the last execution of the command 
> "touch /root/ok2" failed,
> because the command to be executed has to be an absolute path. 
> (CFEngine, for security reasons,
> does not follow the system PATH).
>
> The command you would want to execute is: "/bin/touch /root/ok2"
>
> The second report means that the command, on this machine, will be 
> executed every day after 16:00 with
> a randomized time specific to this machine. The goal is to balance the 
> load of executing the same command
> on a whole IT infrastructure, like a backup job.
>
> About the possibility to run a command every 5 minutes with return 
> code handling, we currently do not have
> a Technique to do this as running a command every 5 minutes is not 
> really the Rudder way (which is to
> lead the machine towards convergeance, which means that the ideal 
> state on a machine if converged is to do
> nothing but check that everything is right).
>
> However, there might be some alternatives for your specific case, can 
> you please explain why do you need to do
> this, especially with return code handling ?
>
> Regards,
> -- 
> Matthieu CERDA
>


Hello Matthieu,

Thank you for the information.
i had not thought of the absolute path.

I understood the rudder way.
We have a some details, like check is a database or table exist ( and 
create if not ) , or check one line in a conf file.
A shell script with a condition is more adjustable for these tasks.
And the return code is for collect results on the web interface.

Maybe it's not a good idea ?

Regards,

Mikaël Mantel


More information about the rudder-users mailing list