help-cfengine
[Top][All Lists]
Advanced

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

Re: strange warning


From: Akop Pogosian
Subject: Re: strange warning
Date: Tue, 4 Feb 2003 13:08:24 -0800
User-agent: Mutt/1.4i

On Tue, Feb 04, 2003 at 04:13:11PM -0400, Chris Edillon wrote:
> On Mon, 3 Feb 2003, Akop Pogosian wrote:
> 
> > My editfiles section looks like this:
> > 
> >   !initial::
> >     { /var/spool/cron/crontabs/root
> > 
> >     AppendIfNoSuchLine "0 * * * * /var/LPFS/cfengine/bin/cfexecd -F"
> >     Inform "true"
> >     DefineClasses "restart_cron"
> >     }
> > 
> >   initial::
> >     { /var/spool/cron/crontabs/root
> > 
> >     AppendIfNoSuchLine "0 * * * * /var/LPFS/cfengine/bin/cfexecd -F"
> >     Inform "true"
> >     }
> > 
> > 
> > 
> > It works fine. However, when the "initial" class is defined and if
> > cfengine is running in verbose mode (which happens only when I run
> > "cfagent -q -v -D initial" from command line), it prints the following
> > warning at the end:
> > 
> > *********************************************************************
> > Main Tree Sched: editfiles pass 2 @ Mon Feb  3 19:00:56 2003
> > *********************************************************************
> > cfengine:zig: Too soon for editfile._var_spool_cron_crontabs_root (0/1
> > minutes )
> > 
>   the default IfElapsed time is 1 minute, and this message indicates
> that for the particular atomic action cfagent is trying to execute
> (editing /var/spool/cron/crontabs/root), has already occured within
> the last minute.  do you happen to be running "cfagent -vq -D initial"
> just after the normal cfagent run, or after running it by hand without
> defining "initial"?  that would cause the behavior you're seeing.  try
> waiting at least a minute after the last cfagent run before trying it
> from the command line with "-D initial".

No, I made sure to wait for longer than a minute before running this
command. That's why this warning surprises me. 

> 
> > Note that this happens after all editfiles actions are supposed to
> > take place and editfiles is mentioned only once in actionsequence. So,
> > it is puzzling to me why I get this error. Also, if I rename the
> > "!initial" section into something that also isn't supposed to be
> > defined on a test host (e.g. class "blah"), then this message goes
> > away which again is puzzling me. Is cfengine trying to execute the
> > commands for class "initial" and "!initial" despite the fact that
> > there is no way this can be true? 
> > 
>   if you change "!initial" to "blah", and blah isn't defined for the
> host in question, then the atomic action of editing root's crontab
> never happens.  so, when cfagent tries to see if it has already
> occurred within the past minute, it thinks not so performs the edit.

What I find confusing is that since the host already belongs to the
class "initial", why should anything from class "!initial" matter to
cfagent? Thanks,


-akop




reply via email to

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