[rudder-users] [HELP] Job scheduler failed
Matthieu CERDA
matthieu.cerda at normation.com
Thu Oct 24 14:57:38 CEST 2013
Le 24/10/2013 13:45, Mikaël Mantel a écrit :
> 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
Hi back,
To check the line in a conf file, there are quite a lot of Techniques to
do it now, like the "Enforce a file content" one that can ensure that a
specific line is present, replace a pattern or delete specific patterns,
and a Technique to run a command if the result of another command meets
certain criteria is on the tracks.
I don't really think that relying on an external shell script to do that
is a good idea, because:
* You need to specify a "protocol" to make Rudder and your shell bit
interoperate (in your case, the return codes)
* You are dependant on a separate component besides the Rudder agent
(the shell itself)
* Shell scripts are not really made for idempotency by design, which
may conflict with the agent behavior.
There is a builtin possibility in CFEngine to extend the agent
possibilities using any executable file: the modules. But it should be
used only in exceptionnal cases.
Regards,
--
Matthieu CERDA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20131024/d45ad7ac/attachment.html>
More information about the rudder-users
mailing list