[rudder-dev] A command to manage rudder agent (and then server)

Jonathan Clarke jonathan.clarke at normation.com
Tue Nov 25 18:33:25 CET 2014


On 25/11/14 10:19, Benoit Peccatte wrote:
> Le 25/11/2014 01:16, Jean Rémond a écrit :
>> Hello guys,
> Hello Jean,
>
>> Here are my 2 cents for the command-line :

Thanks for these Jean! :)

>> - make the help available from any argument and coherent, ex :
>> "rudder agent help" and "rudder help agent" should return the same
>> information
>
> Already done :)
>
>> - standardize debug flag (-d and/or --debug  for example) and make it
>> applicable through all levels (any nested script should respect debug
>> flag)
>> - it does exist so : do NOT use information from headers inside the
>> script, it mixes comments and code logic (see Debian apache2 modules
>> dependencies or LSB init script)
>
> We use them for documentation, like a lot of language do with
> annotations This is useful to keep the help data on the sub-command
> side without having to run them all the time. 
>
>
>> - be careful to any dependency added (rsync for example in the pull
>> request)
>
> Well spotted, we try to add as few dependencies as possible on the
> client side, we will replace rsync with something else.

I just noticed that we also depend on "service" and "uuidgen", which I'm
pretty sure are not available on AIX... (see
https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-enable#L15
and
https://github.com/Normation/rudder-agent/blob/branches/rudder/3.0/share/commands/agent-reinit#L9).

>> - standardize common flags for each script so external contributions
>> will be homogeneous (-d for debug, -v for verbose, etc)
>
> I agree that it is a good thing to standardize the meaning of some flag.
> However, I think it's too burdensome to guarantee their existence on
> every sub-command.

Without actually guaranteeing they exist, we can still define the
standard so that other authors know about it, and avoid using those
flags for other things. I suggest documenting this in the README file in
the git repo, and providing a simple template for new tasks that
includes the minimal skeleton: @description tag, getopts for -v/-d/etc.

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20141125/59128846/attachment.html>


More information about the rudder-dev mailing list