help-cfengine
[Top][All Lists]
Advanced

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

RE: OutputPrefix


From: Wheeler, John
Subject: RE: OutputPrefix
Date: Fri, 28 Jan 2005 10:52:48 -0600

Sounds like a good plan. I though that, with regard to variables, that
the last value set wins, meaning that if you do redefine a variable
(macro) that only the last value set will be used. Is this not the case?



> -----Original Message-----
> From: address@hidden
[mailto:help-cfengine-
> address@hidden On Behalf Of Brian E. Seppanen
> Sent: Friday, January 28, 2005 10:30 AM
> To: address@hidden
> Subject: OutputPrefix
> 
> I love Output Prefix.  I don't know if I'm strange or not, but I'm
hoping
> to use OutputPrefix in each specific cf that is activated by cfagent,
> which would require output prefix to be redefined (and which is giving
me
> the following error: Warning: Redefinition of macro OutputPrefix).  I
> can't claim to understand the implications to code modifications
required
> to allow it, but I would like to present it as a feature request.
> 
> I have cfagent use an output prefix of init-> which is defined in
> update.conf.  During the cfagent run, it interprets a host as having
two
> other corresponding classes.  one is a hard class of linux which runs
> cf.linux
> which has an output prefix defined under control in cf.linux as
> linux+$host.  The host also belongs to group servicea, and servicea
has
> output prefix
> defined under control as cf.servicea as servicea+$host.
> 
> update.conf is run and copies relevent config files and then
cfagent.conf
> runs with those interpreted configs
> 
> 
> init->:in/cfagent -i -: Looking for an input file
> /var/cfengine/inputs/cfagent.conf
> init->:in/cfagent -i -: Looking for an input file cf.groups
> init->:in/cfagent -i -: Looking for an input file cf.servicea
> init->:in/cfagent -i -: Looking for an input file cf.linux
> init->:in/cfagent -i -: Finished with
/var/cfengine/inputs/cfagent.conf
> 
> The output I think would be very useful is
> 
> init->:in/cfagent -i -: linux+masterhost->: Update of image
> /var/cfengine/inputs/cf.linux from master
/var/cfengine/os/linux/cf.linux
> on localhost
> init->:in/cfagent -i -: linux+masterhost->: Group of
> /var/cfengine/inputs/cf.linux was 0, setting to 1
> init->:in/cfagent -f -: servicea+masterhost->: Update of image
> /var/cfengine/inputs/cf.servicea from master
> /var/cfengine/services/servicea/cf.servicea
> ...etc...
> 
> The output that I get is
> 
> init->:in/cfagent -i -: Checking copy from
> localhost:/var/cfengine/os/linux/cf.linux to
/var/cfengine/inputs/cf.linux
> init->:in/cfagent -i -: linux+masterhost->: Update of image
> /var/cfengine/inputs/cf.linux from master
/var/cfengine/os/linux/cf.linux
> on localhost
> init->:in/cfagent -i -: linux+masterhost->: Group of
> /var/cfengine/inputs/cf.linux was 0, setting to 1
> init->:in/cfagent -i -: linux+masterhost->: Object
> /var/cfengine/inputs/cf.linux had permission 600, changed it to 664
> init->:in/cfagent -i -: Checking copy from
> localhost:/var/cfengine/services/servicea/cf.servicea to
> /var/cfengine/inputs/cf.servicea
> init->:in/cfagent -i -: linux+masterhost->: Update of image
> /var/cfengine/inputs/cf.servicea from master
> /var/cfengine/services/servicea/cf.servicea on localhost
> init->:in/cfagent -i -: linux+masterhost->: Object
> /var/cfengine/inputs/cf.servicea had permission 600, changed it to 644
> init->:in/cfagent -i -: Saving the setuid log in
> /var/cfengine/cfagent.masterhost.domaina.log
> 
> With the following error further up indicating that I can't redefine
it.
> 
> init->: Executing script /var/cfengine/sbin/cfagent -i -v -f
> /var/cfengine/inputs/cfagent.conf...(timeout=0,uid=-1,gid=-1)
> (Setting umask to 77)
> init->:in/cfagent -i -: cfengine::/var/cfengine/inputs/cf.linux:23:
> Warning: Redefinition of macro OutputPrefix=linux+masterhost-> (or
perhaps
> missing quote)
> 
> 
> Would there be any hope in this being added?    i would hope that
others
> would find that sort of behavior useful.    I believe it would enhance
> readability.
> 
> My end goal for this is to use a standardized naming to permit
stripping
> of some of the output to summarize activities, so the cfengine
ignorant
> can see what is happening.  such that I end up with
> /var/log/cfengine/host/class/date/time.txt I would
> use the emailed output sent through procmail parsed and dumped to that
> hierarchy.
> 
> Is it possible that I've missed the obvious and I can create the
> functionality at this time with modifications to execution and configs
and
> requiring no modifications to code?
> 
> 
> Thanks for all of the help.
> 
> 
> 
> 
> 
> Brian Seppanen
> address@hidden
> 608.826.1464
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cfengine





reply via email to

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