Mohamed Lrhazi
2011-Oct-16 17:26 UTC
[Puppet Users] How does an ENC find the client''s enviromement?
Hello, I started writing an ENC and run into what seems like a chicken and egg problem... I was starting off by getting the client''s facts from the inventory service by getting: https://puppetmaster:8140/production/facts/$client_hostname and then was getting the "environment" from the fact named "environment" then I realized that "production" in the previous URL is the environment I am querying! Is there another way of finding the environment that the client is providing to the master? Thanks a lot, Mohamed. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Oct-16 23:38 UTC
[Puppet Users] Fwd: How does an ENC find the client''s enviromement?
I tried to work around the problem by having a copy of the ENC per environment, which would work for me too... but then that does not work either: external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py In the above, $environment evaluates to "production" even though my "puppet agent" call specified a different environment. I guess the above is evaluated on master''s start up, only once, not per client invocation. Thanks a lot, Mohamed. On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> Hello, > > I started writing an ENC and run into what seems like a chicken and > egg problem... > > I was starting off by getting the client''s facts from the inventory > service by getting: > > https://puppetmaster:8140/production/facts/$client_hostname > > and then was getting the "environment" from the fact named "environment" > > then I realized that "production" in the previous URL is the > environment I am querying! > > Is there another way of finding the environment that the client is > providing to the master? > > Thanks a lot, > Mohamed. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2011-Oct-17 12:53 UTC
[Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote:> I tried to work around the problem by having a copy of the ENC per > environment, which would work for me too... but then that does not > work either: > > external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py > > In the above, $environment evaluates to "production" even though my > "puppet agent" call specified a different environment. > > I guess the above is evaluated on master''s start up, only once, not > per client invocation. > > Thanks a lot, > Mohamed. > > On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> wrote: > > Hello, > > > I started writing an ENC and run into what seems like a chicken and > > egg problem... > > > I was starting off by getting the client''s facts from the inventory > > service by getting: > > >https://puppetmaster:8140/production/facts/$client_hostname > > > and then was getting the "environment" from the fact named "environment" > > > then I realized that "production" in the previous URL is the > > environment I am querying! > > > Is there another way of finding the environment that the client is > > providing to the master?The client may specify in its puppet.conf which environment it thinks it is in (key ''environment''). The ENC may also specify which environment a client is in by setting the variable "environment", but see http://projects.puppetlabs.com/issues/3910 for problems related to that. Your master can specify the default environment for nodes that do not otherwise specify one, via the "environment" key in the [master] section of their own puppet.conf. I''m not sure offhand whether something like 3910 applies if the default is changed. This is all covered in the External Nodes Guide and the puppet.conf documentation. John -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Oct-17 15:23 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger <John.Bollinger@stjude.org> wrote:> > > On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote: >> I tried to work around the problem by having a copy of the ENC per >> environment, which would work for me too... but then that does not >> work either: >> >> external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py >> >> In the above, $environment evaluates to "production" even though my >> "puppet agent" call specified a different environment. >> >> I guess the above is evaluated on master''s start up, only once, not >> per client invocation. >> >> Thanks a lot, >> Mohamed. >> >> On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> wrote: >> > Hello, >> >> > I started writing an ENC and run into what seems like a chicken and >> > egg problem... >> >> > I was starting off by getting the client''s facts from the inventory >> > service by getting: >> >> >https://puppetmaster:8140/production/facts/$client_hostname >> >> > and then was getting the "environment" from the fact named "environment" >> >> > then I realized that "production" in the previous URL is the >> > environment I am querying! >> >> > Is there another way of finding the environment that the client is >> > providing to the master? > > > The client may specify in its puppet.conf which environment it thinks > it is in (key ''environment''). The ENC may also specify which > environment a client is in by setting the variable "environment", but > see http://projects.puppetlabs.com/issues/3910 for problems related to > that. Your master can specify the default environment for nodes that > do not otherwise specify one, via the "environment" key in the > [master] section of their own puppet.conf. I''m not sure offhand > whether something like 3910 applies if the default is changed. This > is all covered in the External Nodes Guide and the puppet.conf > documentation. > >Thanks a lot John... I tried and could not find my answer in the docs. my specific question is: - When the master calls my ENC, it knows what the environment of the client is, regardless of where it got it from, right? - All the master passes to the ENC is the clients'' cert name, nothing else. My question is whether there is a way for the ENC to find that environment or not? Thanks a lot, Mohamed. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Oct-17 15:25 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
To be clearer.. am asking about "ENC setting the environment", just ''finding it out". On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger <John.Bollinger@stjude.org> wrote: >> >> >> On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote: >>> I tried to work around the problem by having a copy of the ENC per >>> environment, which would work for me too... but then that does not >>> work either: >>> >>> external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py >>> >>> In the above, $environment evaluates to "production" even though my >>> "puppet agent" call specified a different environment. >>> >>> I guess the above is evaluated on master''s start up, only once, not >>> per client invocation. >>> >>> Thanks a lot, >>> Mohamed. >>> >>> On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> wrote: >>> > Hello, >>> >>> > I started writing an ENC and run into what seems like a chicken and >>> > egg problem... >>> >>> > I was starting off by getting the client''s facts from the inventory >>> > service by getting: >>> >>> >https://puppetmaster:8140/production/facts/$client_hostname >>> >>> > and then was getting the "environment" from the fact named "environment" >>> >>> > then I realized that "production" in the previous URL is the >>> > environment I am querying! >>> >>> > Is there another way of finding the environment that the client is >>> > providing to the master? >> >> >> The client may specify in its puppet.conf which environment it thinks >> it is in (key ''environment''). The ENC may also specify which >> environment a client is in by setting the variable "environment", but >> see http://projects.puppetlabs.com/issues/3910 for problems related to >> that. Your master can specify the default environment for nodes that >> do not otherwise specify one, via the "environment" key in the >> [master] section of their own puppet.conf. I''m not sure offhand >> whether something like 3910 applies if the default is changed. This >> is all covered in the External Nodes Guide and the puppet.conf >> documentation. >> >> > > Thanks a lot John... I tried and could not find my answer in the docs. > my specific question is: > > - When the master calls my ENC, it knows what the environment of the > client is, regardless of where it got it from, right? > - All the master passes to the ENC is the clients'' cert name, nothing else. > > My question is whether there is a way for the ENC to find that > environment or not? > > Thanks a lot, > Mohamed. >-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan Bode
2011-Oct-17 15:40 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
The client''s environment is stored as a fact. Facts are saved before the ENC is called. By default, they will be saved to /var/lib/puppet/yaml/facts/NODE_NAME/TIMESTAMP.yaml An ENC can read a client''s latest environment and other facts from this location. -Dan On Mon, Oct 17, 2011 at 8:25 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> To be clearer.. am asking about "ENC setting the environment", just > ''finding it out". > > > On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: > > On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger <John.Bollinger@stjude.org> > wrote: > >> > >> > >> On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote: > >>> I tried to work around the problem by having a copy of the ENC per > >>> environment, which would work for me too... but then that does not > >>> work either: > >>> > >>> external_nodes = /etc/puppet/environments/$environment/gu-enc/gu-enc.py > >>> > >>> In the above, $environment evaluates to "production" even though my > >>> "puppet agent" call specified a different environment. > >>> > >>> I guess the above is evaluated on master''s start up, only once, not > >>> per client invocation. > >>> > >>> Thanks a lot, > >>> Mohamed. > >>> > >>> On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> > wrote: > >>> > Hello, > >>> > >>> > I started writing an ENC and run into what seems like a chicken and > >>> > egg problem... > >>> > >>> > I was starting off by getting the client''s facts from the inventory > >>> > service by getting: > >>> > >>> >https://puppetmaster:8140/production/facts/$client_hostname > >>> > >>> > and then was getting the "environment" from the fact named > "environment" > >>> > >>> > then I realized that "production" in the previous URL is the > >>> > environment I am querying! > >>> > >>> > Is there another way of finding the environment that the client is > >>> > providing to the master? > >> > >> > >> The client may specify in its puppet.conf which environment it thinks > >> it is in (key ''environment''). The ENC may also specify which > >> environment a client is in by setting the variable "environment", but > >> see http://projects.puppetlabs.com/issues/3910 for problems related to > >> that. Your master can specify the default environment for nodes that > >> do not otherwise specify one, via the "environment" key in the > >> [master] section of their own puppet.conf. I''m not sure offhand > >> whether something like 3910 applies if the default is changed. This > >> is all covered in the External Nodes Guide and the puppet.conf > >> documentation. > >> > >> > > > > Thanks a lot John... I tried and could not find my answer in the docs. > > my specific question is: > > > > - When the master calls my ENC, it knows what the environment of the > > client is, regardless of where it got it from, right? > > - All the master passes to the ENC is the clients'' cert name, nothing > else. > > > > My question is whether there is a way for the ENC to find that > > environment or not? > > > > Thanks a lot, > > Mohamed. > > > > -- > 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+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Oct-17 16:42 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
Task a lot Dan... I will use that, though I was hoping for a solution using the inventory service...It looks like one needs to know the environment first, before speaking to it: http://docs.puppetlabs.com/guides/rest_api.html#facts Mohamed. On Mon, Oct 17, 2011 at 11:40 AM, Dan Bode <dan@puppetlabs.com> wrote:> The client''s environment is stored as a fact. Facts are saved before the ENC > is called. By default, they will be saved to > /var/lib/puppet/yaml/facts/NODE_NAME/TIMESTAMP.yaml > > An ENC can read a client''s latest environment and other facts from this > location. > > -Dan > > On Mon, Oct 17, 2011 at 8:25 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >> >> To be clearer.. am asking about "ENC setting the environment", just >> ''finding it out". >> >> >> On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >> > On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger <John.Bollinger@stjude.org> >> > wrote: >> >> >> >> >> >> On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote: >> >>> I tried to work around the problem by having a copy of the ENC per >> >>> environment, which would work for me too... but then that does not >> >>> work either: >> >>> >> >>> external_nodes >> >>> /etc/puppet/environments/$environment/gu-enc/gu-enc.py >> >>> >> >>> In the above, $environment evaluates to "production" even though my >> >>> "puppet agent" call specified a different environment. >> >>> >> >>> I guess the above is evaluated on master''s start up, only once, not >> >>> per client invocation. >> >>> >> >>> Thanks a lot, >> >>> Mohamed. >> >>> >> >>> On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> >> >>> wrote: >> >>> > Hello, >> >>> >> >>> > I started writing an ENC and run into what seems like a chicken and >> >>> > egg problem... >> >>> >> >>> > I was starting off by getting the client''s facts from the inventory >> >>> > service by getting: >> >>> >> >>> >https://puppetmaster:8140/production/facts/$client_hostname >> >>> >> >>> > and then was getting the "environment" from the fact named >> >>> > "environment" >> >>> >> >>> > then I realized that "production" in the previous URL is the >> >>> > environment I am querying! >> >>> >> >>> > Is there another way of finding the environment that the client is >> >>> > providing to the master? >> >> >> >> >> >> The client may specify in its puppet.conf which environment it thinks >> >> it is in (key ''environment''). The ENC may also specify which >> >> environment a client is in by setting the variable "environment", but >> >> see http://projects.puppetlabs.com/issues/3910 for problems related to >> >> that. Your master can specify the default environment for nodes that >> >> do not otherwise specify one, via the "environment" key in the >> >> [master] section of their own puppet.conf. I''m not sure offhand >> >> whether something like 3910 applies if the default is changed. This >> >> is all covered in the External Nodes Guide and the puppet.conf >> >> documentation. >> >> >> >> >> > >> > Thanks a lot John... I tried and could not find my answer in the docs. >> > my specific question is: >> > >> > - When the master calls my ENC, it knows what the environment of the >> > client is, regardless of where it got it from, right? >> > - All the master passes to the ENC is the clients'' cert name, nothing >> > else. >> > >> > My question is whether there is a way for the ENC to find that >> > environment or not? >> > >> > Thanks a lot, >> > Mohamed. >> > >> >> -- >> 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+unsubscribe@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Dan Bode
2011-Oct-17 20:48 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Mon, Oct 17, 2011 at 9:42 AM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> Task a lot Dan... I will use that, though I was hoping for a solution > using the inventory service...It looks like one needs to know the > environment first, before speaking to it: >The same should also hold true for the inventory service. I believe that the calls that save facts to the inventory service are all synchronous. http://docs.puppetlabs.com/guides/rest_api.html#facts>Having environment present as a part of the URL''s is just a convention for restful interfaces. Ju st provide ''production'' as the environment and you will be able to access everything> > Mohamed. > > On Mon, Oct 17, 2011 at 11:40 AM, Dan Bode <dan@puppetlabs.com> wrote: > > The client''s environment is stored as a fact. Facts are saved before the > ENC > > is called. By default, they will be saved to > > /var/lib/puppet/yaml/facts/NODE_NAME/TIMESTAMP.yaml > > > > An ENC can read a client''s latest environment and other facts from this > > location. > > > > -Dan > > > > On Mon, Oct 17, 2011 at 8:25 AM, Mohamed Lrhazi <lrhazi@gmail.com> > wrote: > >> > >> To be clearer.. am asking about "ENC setting the environment", just > >> ''finding it out". > >> > >> > >> On Mon, Oct 17, 2011 at 11:23 AM, Mohamed Lrhazi <lrhazi@gmail.com> > wrote: > >> > On Mon, Oct 17, 2011 at 8:53 AM, jcbollinger < > John.Bollinger@stjude.org> > >> > wrote: > >> >> > >> >> > >> >> On Oct 16, 6:38 pm, Mohamed Lrhazi <lrh...@gmail.com> wrote: > >> >>> I tried to work around the problem by having a copy of the ENC per > >> >>> environment, which would work for me too... but then that does not > >> >>> work either: > >> >>> > >> >>> external_nodes > >> >>> /etc/puppet/environments/$environment/gu-enc/gu-enc.py > >> >>> > >> >>> In the above, $environment evaluates to "production" even though my > >> >>> "puppet agent" call specified a different environment. > >> >>> > >> >>> I guess the above is evaluated on master''s start up, only once, not > >> >>> per client invocation. > >> >>> > >> >>> Thanks a lot, > >> >>> Mohamed. > >> >>> > >> >>> On Sun, Oct 16, 2011 at 1:26 PM, Mohamed Lrhazi <lrh...@gmail.com> > >> >>> wrote: > >> >>> > Hello, > >> >>> > >> >>> > I started writing an ENC and run into what seems like a chicken > and > >> >>> > egg problem... > >> >>> > >> >>> > I was starting off by getting the client''s facts from the > inventory > >> >>> > service by getting: > >> >>> > >> >>> >https://puppetmaster:8140/production/facts/$client_hostname > >> >>> > >> >>> > and then was getting the "environment" from the fact named > >> >>> > "environment" > >> >>> > >> >>> > then I realized that "production" in the previous URL is the > >> >>> > environment I am querying! > >> >>> > >> >>> > Is there another way of finding the environment that the client is > >> >>> > providing to the master? > >> >> > >> >> > >> >> The client may specify in its puppet.conf which environment it thinks > >> >> it is in (key ''environment''). The ENC may also specify which > >> >> environment a client is in by setting the variable "environment", but > >> >> see http://projects.puppetlabs.com/issues/3910 for problems related > to > >> >> that. Your master can specify the default environment for nodes that > >> >> do not otherwise specify one, via the "environment" key in the > >> >> [master] section of their own puppet.conf. I''m not sure offhand > >> >> whether something like 3910 applies if the default is changed. This > >> >> is all covered in the External Nodes Guide and the puppet.conf > >> >> documentation. > >> >> > >> >> > >> > > >> > Thanks a lot John... I tried and could not find my answer in the docs. > >> > my specific question is: > >> > > >> > - When the master calls my ENC, it knows what the environment of the > >> > client is, regardless of where it got it from, right? > >> > - All the master passes to the ENC is the clients'' cert name, nothing > >> > else. > >> > > >> > My question is whether there is a way for the ENC to find that > >> > environment or not? > >> > > >> > Thanks a lot, > >> > Mohamed. > >> > > >> > >> -- > >> 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+unsubscribe@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-users@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscribe@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-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@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-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jcbollinger
2011-Oct-18 13:28 UTC
[Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Oct 17, 10:23 am, Mohamed Lrhazi <lrh...@gmail.com> wrote:> - When the master calls my ENC, it knows what the environment of the > client is, regardless of where it got it from, right?No, it doesn''t, and it can''t. That''s one of the things the ENC is permitted to decide. The master knows what environment the client *claims* to be in, if any, and it knows the default environment, but it cannot predict what environment the ENC will assert for the node, if any. If the ENC asserts an environment then that wins. John -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
R.I.Pienaar
2011-Oct-18 13:57 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
----- Original Message -----> > > On Oct 17, 10:23 am, Mohamed Lrhazi <lrh...@gmail.com> wrote: > > - When the master calls my ENC, it knows what the environment of > > the > > client is, regardless of where it got it from, right? > > No, it doesn''t, and it can''t. That''s one of the things the ENC is > permitted to decide. The master knows what environment the client > *claims* to be in, if any, and it knows the default environment, but > it cannot predict what environment the ENC will assert for the node, > if any. If the ENC asserts an environment then that wins.on paper yes, but it doesnt work that way. there''s a bug, the only place to reliably put the environment now is on the node in puppet.conf. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Oct-18 15:07 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Tue, Oct 18, 2011 at 6:57 AM, R.I.Pienaar <rip@devco.net> wrote:> > > ----- Original Message ----- > > > > > > On Oct 17, 10:23 am, Mohamed Lrhazi <lrh...@gmail.com> wrote: > > > - When the master calls my ENC, it knows what the environment of > > > the > > > client is, regardless of where it got it from, right? > > > > No, it doesn''t, and it can''t. That''s one of the things the ENC is > > permitted to decide. The master knows what environment the client > > *claims* to be in, if any, and it knows the default environment, but > > it cannot predict what environment the ENC will assert for the node, > > if any. If the ENC asserts an environment then that wins. > > on paper yes, but it doesnt work that way. > > there''s a bug, the only place to reliably put the environment now is on > the node in puppet.conf. > >Note that an agent-side fact $environment also works here. -- Nigel Kersten Product Manager, Puppet Labs -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
R.I.Pienaar
2011-Oct-18 15:50 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
----- Original Message -----> > > > On Tue, Oct 18, 2011 at 6:57 AM, R.I.Pienaar < rip@devco.net > wrote: > > > > > > ----- Original Message ----- > > > > > > On Oct 17, 10:23 am, Mohamed Lrhazi < lrh...@gmail.com > wrote: > > > - When the master calls my ENC, it knows what the environment of > > > the > > > client is, regardless of where it got it from, right? > > > > No, it doesn''t, and it can''t. That''s one of the things the ENC is > > permitted to decide. The master knows what environment the client > > *claims* to be in, if any, and it knows the default environment, > > but > > it cannot predict what environment the ENC will assert for the > > node, > > if any. If the ENC asserts an environment then that wins. > > on paper yes, but it doesnt work that way. > > there''s a bug, the only place to reliably put the environment now is > on > the node in puppet.conf. > > > > > Note that an agent-side fact $environment also works here. >I found this problematic too - you get the mix of code from one environment and files from another. -- R.I.Pienaar -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Craig White
2011-Oct-18 16:02 UTC
Re: [Puppet Users] Re: Fwd: How does an ENC find the client''s enviromement?
On Oct 18, 2011, at 8:07 AM, Nigel Kersten wrote:> > > On Tue, Oct 18, 2011 at 6:57 AM, R.I.Pienaar <rip@devco.net> wrote: > > > ----- Original Message ----- > > > > > > On Oct 17, 10:23 am, Mohamed Lrhazi <lrh...@gmail.com> wrote: > > > - When the master calls my ENC, it knows what the environment of > > > the > > > client is, regardless of where it got it from, right? > > > > No, it doesn''t, and it can''t. That''s one of the things the ENC is > > permitted to decide. The master knows what environment the client > > *claims* to be in, if any, and it knows the default environment, but > > it cannot predict what environment the ENC will assert for the node, > > if any. If the ENC asserts an environment then that wins. > > on paper yes, but it doesnt work that way. > > there''s a bug, the only place to reliably put the environment now is on > the node in puppet.conf. > > > Note that an agent-side fact $environment also works here.---- tastes great, less filling Being able to definitively set the environment at the ENC and actually have it work is a very desirable concept. Craig -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.