On Thu, Feb 10, 2011 at 4:20 PM, Nigel Kersten <[email protected]> wrote:

> On Mon, Jan 31, 2011 at 3:42 PM, Jordan Sissel <[email protected]>
> wrote:
> > short story: my facts drive 100% of infrastructure decisions, including
> > custom facts. Storeconfigs facts seem to be write-once and actually
> override
> > local facts. So simple facts like IP address changes, etc, are permanent
> > until I purge the database.
> > Patch here:
> >
> https://github.com/jordansissel/puppet/commit/3b4e72036e7ae9a2cfda781e24ee39648709f548
>
> Is this the patch that you realized doesn't actually do what you need
> Jordan?
>
> There's definitely an issue here.
>

It's hard to tell as I've been context switching between so many projects
lately -

But basically, the symptom in production is that we would add a new machine
of role 'foo' and all the other machines in the fleet should be getting a
custom fact updated that lists the machines with role 'foo' - under this
bug, that fact never updates until I purge the storeconfigs db.

I thought my patch fixed it, and it at least appears to do so in testing,
but in production (after rolling out the patch) I observed the same behavior
again with new fact information not showing up until I again purged the
database.

Take my "I don't think my patch worked right" with some grain of salty
insanity.

I wonder. I think this might be an execution-order problem. Where my patch
sets a flag (but has no code block associated), and in another part of the
code, the flag is used to determine 'master' behavior at which point the
flag value (storeconfig_facts) is checked and tunes whether or not to use
active record for the fact cache. I see some other flags (thin_storeconfigs,
etc) haver "hook" blocks that might be what I should be doing in my patch?

Thoughts?

Here's results from a real production machine running this patch:

ops(~) % FACTER_funfact="hello world" /usr/lib/ruby/gems/1.8/bin/puppet
apply --storeconfigs --dblocation ./storeconfigs.sqlite -e
'notice($funfact)'
cat: /proc/xen/capabilities: Permission denied
notice: Scope(Class[main]): hello world
ops(~) % FACTER_funfact="nevermore" /usr/lib/ruby/gems/1.8/bin/puppet apply
--storeconfigs --dblocation ./storeconfigs.sqlite -e 'notice($funfact)'
notice: Scope(Class[main]): hello world
ops(~) % FACTER_funfact="nevermore" /usr/lib/ruby/gems/1.8/bin/puppet apply
--storeconfigs --dblocation ./storeconfigs.sqlite --no-storeconfig_facts -e
'notice($funfact)'
notice: Scope(Class[main]): hello world


ops(~) !1! % gem list puppet

*** LOCAL GEMS ***


ops(~) % gem list jls-puppet

*** LOCAL GEMS ***

jls-puppet (2.6.2)

----


-Jordan




> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/puppet-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to