On Oct 26, 2009, at 4:06 PM, Paul Lathrop wrote:

>
> On Mon, Oct 26, 2009 at 11:34 AM, Markus Roberts
> <[email protected]> wrote:
>> We have a ticket open (#2748) over a change in behaviour between  
>> 0.24.x and
>> 0.25.x.
>>
>> In 0.24.x, the environment specified in the client's configuration  
>> file
>> could be overridden by the server using the external_nodes  
>> information.
>>
>> In 0.25.x, all requests from the client contain the environment as  
>> part of
>> the url, which means the environment needs to be established before  
>> the
>> first request so this trick no longer works.
>
> The server *absolutely* needs to be able to "force" an environment on
> the client. While I understand the use case for the other way around,
> we treat the master as our source of truth and while we allow clients
> to "suggest" things, we need to be able to over-ride that.
>
>> I've heard a number of ideas for dealing with this and would be  
>> interested
>> in hearing others, and/or arguments for or against the ones already  
>> on the
>> table.  Ideas so far:
>>
>> * Sites that need this functionality can set up a starting  
>> environment for
>> nodes that only pushes the configuration file, and the  
>> configuration file
>> can be a template filled in with the appropriate external_node  
>> parameters.
>> This will require an extra cycle for new nodes and for existing  
>> nodes when
>> their environment changes at such sites, but would not require any  
>> code
>> changes or have any impact on sites that don't need it.
>
> This kinda sucks.
>
>> * Change puppet to request the node information from the server  
>> before
>> anything else (e.g. before plugins).  This would have a small  
>> overhead for
>> all puppet runs and necessitate a moderately small code change.
>
> This seems like a reasonable compromise.
>
>> * Change the default environment on the client to a special "ask  
>> the server"
>> environment.  Clients that specified an environment in their  
>> configuration
>> or on the command line would use that environment.  Clients that  
>> did not
>> specify an environment would request it from the server, imposing a  
>> small
>> overhead only for machines that needed it.  This would require a  
>> somewhat
>> larger code change.
>
> This seems the optimal solution, but I am not volunteering to write
> the code, so I'd understand it not happening soonish.
>
>> So what is the sense of the community?
>
> This shouldn't hold up 0.25.1. I think it is worthwhile to support
> both use cases i.e. client can request a certain environment, and
> server can optionally force the client into another environment.

Seems like we have a reasonable agreement:  This shouldn't hold up  
0.25.1, and we'll probably take the easy way out once that's released  
-- add the 'collect env at beginning' step, and if it gets to be  
painful, we can optimize it away later.

-- 
The brain is a wonderful organ. It starts working the moment you get
up in the morning and does not stop until you get into the office.
     --Robert Frost
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
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