help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting $(allclasses) into a shellcommand


From: Chip Seraphine
Subject: Re: Getting $(allclasses) into a shellcommand
Date: Tue, 20 Jul 2004 16:54:22 -0500
User-agent: KMail/1.5.4

On Tuesday 20 July 2004 16:18, Ed Brown wrote:
> To back up a little, and to try to understand this thread a little
> better, it seems like it should be said that being able to pass
> $(allclasses) to another script works just fine, except when it grows
> very long.  
> 
> 1. What are the limits we are talking about?  Buffer sizes in cfengine? 
> Bash command line limits?  Without knowing what the problem is, it's
> hard to weigh some of the solutions that have been offered.  

We are talking about expansion buffers within cfengine.  Mark increased the 
size (I think between 2.1.5 and 2.1.6) recently, which helps, but a fixed 
buffer is still a fixed buffer.  

(Unfortunately, the correspondance regarding the increased buffer size was 
largely off-list.)

> 2. When do too-long $(allclasses) strings get created?  So far, I've
> only seen it mentioned with respect to 'packages:'.

That's the only time I personally have managed to overlflow the buffer, but 
that doesn't mean that it isn't happening elsewhere.

I think a reasonably common convention is passing $(allclasses) to your 
shellcommands and modules; for this reason alone the idea of a truncated 
classlist becomes alarmingly dangerous.

(One is tempted at the idea of setting a 'overflowed_classlist' warning class, 
but since the scripts that need to know about that would never see it due to 
the aforementioned overflow....)

>  Defining classes is
> the only action available in 'packages:'.  It would be great if you
> could execute arbitrary commands, as in 'processes:'.  This could help
> eliminate some of the need to rely on class definitions.  This
> possibility was discussed in a thread several months ago,
> http://lists.gnu.org/archive/html/help-cfengine/2003-11/msg00061.html
> , and I wonder if the implementation might still be in the works?? 

Would be nice if it was, if for no other reason than so I can rid the world of 
yet another perl hack in my /var/cfengine/bin directories :-)


-- 

Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
chip@trdlnk.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]