On Apr 9, 4:06 pm, Jeff McCune <j...@puppetlabs.com> wrote:
> On Mon, Apr 9, 2012 at 4:45 PM, Shantanu <knowshant...@gmail.com> wrote:
>
> > I am using stdlib module's validate_re function to validate parameters
> > passed to a parameterized class as pasted here:
> >http://pastebin.com/7eYAeLEa
> > .
>
> > The validation works fine however when I run this manifest locally
> > using 'puppet apply' command where puppet execution stops if a
> > validation test fails. However when I use it in client-server model
> > then I do see a validation match failure error but rest of the puppet
> > manifest application (file creation) proceeds fine instead of
> > failing.
>
> validate_re will abort the catalog compilation process entirely.  Are you
> sure your puppet agent is not falling back to using a previously cached
> copy of the catalog?
>
> If you use puppet agent --test it will disable the "use cache on failure"
> feature of Puppet.
>
> -Jeff


Thanks Jeff. That was the issue. The pastebin logs do indicate 'using
cached catalog' message.

I am manually starting/stopping puppetd for these tests. I started it
again without '--test' option but this time it couldn't retrieve
(cached) catalog. It failed (or rather skipped catalog run) with
following messages:

{{{
Apr  9 16:15:11 one-23 puppet-agent[24242]: Could not retrieve catalog
from remote server: Error 400 on SERVER: validate_re(): "mysq" does
not match ["mysql", "sqlite"] at /etc/puppet/manifests/classes/
teststdlib.pp:5 on node one-23...
Apr  9 16:15:11 one-23 puppet-agent[24242]: Using cached catalog
Apr  9 16:15:11 one-23 puppet-agent[24242]: Could not retrieve
catalog; skipping run
}}}

If I use '--test' option then I get 'error 400' immediately and
puppetd doesn't get started as well.

Since it once worked for me even without '--test' option I am
wondering how long does a node keep cache? Is cache dependent on any
factors other than time interval?

--
Shantanu

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to