On Fri, May 14, 2010 at 8:12 PM, Dan Bode <d...@puppetlabs.com> wrote:

>
>
> On Fri, May 14, 2010 at 6:01 PM, Nigel Kersten <nig...@google.com> wrote:
>
>>
>>
>> On Fri, May 14, 2010 at 1:42 PM, Paul Lathrop <paul.lath...@gmail.com>wrote:
>>
>>> >>> Assuming the client has puppeted at least once against that server.
>>> This
>>> >>> won't work for bootstrapping a client though will it?
>>> >>
>>> >> it does, the facts yaml file is created before the external node
>>> >> classifier is called ;)
>>> >
>>> > Whoa. This should be called out in the external node docs, as I simply
>>> > assumed this happened after the node classifier is called.
>>>
>>> +1000
>>>
>>>
>> I did some tests as I didn't quite trust this :) and it's absolutely true.
>>
>> So my plan is for my external node provider
>>
>
> do you mean node classifier? Are you using provider in the traditional
> Puppet sense?
>

no, classifier sorry.


>
>
>>  to redirect clients that haven't provided facts to a "bootstrap"
>> environment that contains the bare minimum facts that are required to work
>> out what environment they should be in, and then my puppetd wrapper scripts
>> to detect that a bootstrap run has occurred (probably a file set to be
>> present on the bootstrap run and absent on all other runs) and re-run.
>>
>
> Nigel, I think this answers your question:
>
> write a fact that returns the current environment.
>
> during provisioning, set environment to 'bootstrap'.
>
> in your classifier, set a parameter called $puppet_environment  that is
> used in your puppet class to update environment in puppet.conf.
>

Not quite. This doesn't cope with a machine where someone say incorrectly
wipes out the local fact cache, it wouldn't take effect until the next run.

You need the external node classifier to make the decision as to whether the
client should be redirected to a bootstrap/provisioning environment, but we
have no real way of telling the client that it needs to perform a second
run.

Sometimes I wonder if we should be able to have a directive in puppet
manifests to tell puppet "hey, you need to start your run all over again".


>
>
>> How could we achieve the same functionality within puppetd itself? I can't
>> think of a way this could be done right now with it running as a daemon.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Puppet Users" group.
>> To post to this group, send email to puppet-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
nigel

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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