[augeas-devel] Improving Augeas' idempotence in Puppet

Sergio Ballestrero Sergio.Ballestrero at cern.ch
Fri Apr 6 13:28:44 UTC 2012


On 6 Apr 2012, at 10:26, Raphaël Pinson wrote:

> Hello,
> 
> 
> As of today, the way the Augeas provider in Puppet manages idempotence
> can be somehow problematic. The `onlyif` statements can only be
> evaluated on the client, so all Augeas resources are generally run on
> the client, and whether to run them cannot be easily determined in the
> catalog, unless it relies on other resources as dependencies or on
> custom facts (possibly using the Augeas ruby library).
> 
> Here is a proposition to improve this, by making the Augeas tree
> available on the Puppet server during catalog compilation.
> 
> A new aug_to_xml() API call has been added in Augeas 0.10.0 allowing
> to export the whole (or part of the) Augeas tree as an XML document.
> 
> The idea is the following:
> 
>  * Before compiling the catalog, make a request to retrieve the
> Augeas tree as XML (using facter or another system);
>  * On the server, reinject the XML in a local Augeas instance (using
> a yet-to-code aug_from_xml() call);
>  * Evaluate the onlyif statements (or a new kind of statement) using
> this local copy of the client's Augeas tree;
>  * Calculate the dependencies properly (in fact, the local Augeas
> tree could then be used pretty much as a fact provider for any kind of
> resource);
> 
> 
> How could this be best implemented in Puppet? Are there any drawbacks
> to doing this?
> 
> 
> Raphaël

 Hello Raphael, devs,
speaking as a (happy) puppet and augeas user - in principle I like a lot this idea; the main possible issues that I can see with this are
* impact on the puppet server scalability
* impact on client workload and mem usage (we have some very low-spec clients, embedded HW that can't be upgraded)

By running on the client now puppet can get augeas to use only the modules specific to the one config file that needs to be changed. In your proposal, if I understand correctly, augeas would have to build (on the client) the tree for all config files it may know about, and the server would need to parse and handle the whole tree, multiplied by the number of clients. In order to make a more specific request (of specific parts of the tree) to the client's augeas, the puppet server would probably need to have already compiled the catalog, I suspect?

Cheers,
  Sergio

-- 
 Sergio Ballestrero  - ATLAS TDAQ sysadmin team @CERN
 University of Johannesburg, Physics Department





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20120406/da5201cc/attachment.htm>


More information about the augeas-devel mailing list