Over the weekend we noticed an interesting and unexpected behavior with environments. I made a change to the way our puppet.conf file is generated and distributed, which led to an environment which had been defined on a puppetmaster being no longer defined in puppet.conf. We''ll call this the "core" environement. When clients checked in and asked for the "core" environment, the puppetmaster didn''t know about it. I would have expected an error at this point. However, what happened instead was the puppetmaster passed out the configs for the "production" environment without complaint. IMHO this is a bug, but I can see how it might be by design. Any comments? Should I file it? --Paul -- 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.
Hi Paul, How does your config file look like in the main section? There is a default one if no environment is defined, e.g. environments = production,testing,development* manifest = /opt/puppet/production/site.pp <-- These are the modulepath = /opt/puppet/production/modules <-- default locations* [production] manifest = /opt/puppet/production/site.pp modulepath = /opt/puppet/production/modules [testing] manifest = /opt/puppet/testing/site.pp modulepath = /opt/puppet/testing/modules [development] manifest = /opt/puppet/development/site.pp modulepath = /opt/puppet/development/modules On Mon, Mar 22, 2010 at 10:27 AM, Paul Lathrop <paul@tertiusfamily.net>wrote:> Over the weekend we noticed an interesting and unexpected behavior > with environments. I made a change to the way our puppet.conf file is > generated and distributed, which led to an environment which had been > defined on a puppetmaster being no longer defined in puppet.conf. > We''ll call this the "core" environement. When clients checked in and > asked for the "core" environment, the puppetmaster didn''t know about > it. I would have expected an error at this point. However, what > happened instead was the puppetmaster passed out the configs for the > "production" environment without complaint. > > IMHO this is a bug, but I can see how it might be by design. Any > comments? Should I file it? > > --Paul > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Tony -- 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.
Tony, Sure, I understand that, but if the client is asking for a specific environment that the puppetmaster doesn''t know about, I feel like that warrants a warning at minimum, probably an error and a refusal to compile. Would be interested if anyone has a counter-argument. --Paul On Mon, Mar 22, 2010 at 10:59 AM, Tony G. <tonysk8@gmail.com> wrote:> Hi Paul, > > How does your config file look like in the main section? > > There is a default one if no environment is defined, e.g. > > environments = production,testing,development > manifest = /opt/puppet/production/site.pp <-- These are the > modulepath = /opt/puppet/production/modules <-- default locations > > [production] > manifest = /opt/puppet/production/site.pp > modulepath = /opt/puppet/production/modules > > [testing] > manifest = /opt/puppet/testing/site.pp > modulepath = /opt/puppet/testing/modules > > [development] > manifest = /opt/puppet/development/site.pp > modulepath = /opt/puppet/development/modules > > > On Mon, Mar 22, 2010 at 10:27 AM, Paul Lathrop <paul@tertiusfamily.net> > wrote: >> >> Over the weekend we noticed an interesting and unexpected behavior >> with environments. I made a change to the way our puppet.conf file is >> generated and distributed, which led to an environment which had been >> defined on a puppetmaster being no longer defined in puppet.conf. >> We''ll call this the "core" environement. When clients checked in and >> asked for the "core" environment, the puppetmaster didn''t know about >> it. I would have expected an error at this point. However, what >> happened instead was the puppetmaster passed out the configs for the >> "production" environment without complaint. >> >> IMHO this is a bug, but I can see how it might be by design. Any >> comments? Should I file it? >> >> --Paul >> >> -- >> 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. >> > > > > -- > Tony > > -- > 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.
Oh Ok, so what you are looking for is more like a feature to let you know that the environment "foo" does not exist. Does not sounds bad to me, if somebody uses tons of environments it will reduce errors or at least will be easier to find them. On Mon, Mar 22, 2010 at 11:14 AM, Paul Lathrop <paul.lathrop@gmail.com>wrote:> Tony, > > Sure, I understand that, but if the client is asking for a specific > environment that the puppetmaster doesn''t know about, I feel like that > warrants a warning at minimum, probably an error and a refusal to > compile. Would be interested if anyone has a counter-argument. > > --Paul > > On Mon, Mar 22, 2010 at 10:59 AM, Tony G. <tonysk8@gmail.com> wrote: > > Hi Paul, > > > > How does your config file look like in the main section? > > > > There is a default one if no environment is defined, e.g. > > > > environments = production,testing,development > > manifest = /opt/puppet/production/site.pp <-- These are the > > modulepath = /opt/puppet/production/modules <-- default locations > > > > [production] > > manifest = /opt/puppet/production/site.pp > > modulepath = /opt/puppet/production/modules > > > > [testing] > > manifest = /opt/puppet/testing/site.pp > > modulepath = /opt/puppet/testing/modules > > > > [development] > > manifest = /opt/puppet/development/site.pp > > modulepath = /opt/puppet/development/modules > > > > > > On Mon, Mar 22, 2010 at 10:27 AM, Paul Lathrop <paul@tertiusfamily.net> > > wrote: > >> > >> Over the weekend we noticed an interesting and unexpected behavior > >> with environments. I made a change to the way our puppet.conf file is > >> generated and distributed, which led to an environment which had been > >> defined on a puppetmaster being no longer defined in puppet.conf. > >> We''ll call this the "core" environement. When clients checked in and > >> asked for the "core" environment, the puppetmaster didn''t know about > >> it. I would have expected an error at this point. However, what > >> happened instead was the puppetmaster passed out the configs for the > >> "production" environment without complaint. > >> > >> IMHO this is a bug, but I can see how it might be by design. Any > >> comments? Should I file it? > >> > >> --Paul > >> > >> -- > >> 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > >> For more options, visit this group at > >> http://groups.google.com/group/puppet-users?hl=en. > >> > > > > > > > > -- > > Tony > > > > -- > > 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<puppet-users%2Bunsubscribe@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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Tony -- 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.
On 3/22/10 10:27 AM, Paul Lathrop wrote:> IMHO this is a bug, but I can see how it might be by design. Any > comments? Should I file it? > > --Paul >Don''t know if it''s a bug but... Yeah it defaults to "production" - you have to create an empty manifest for "production" in order to prevent Very Scary Things from occuring if you happen to also have a "production" Puppet env. -scott -- 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.
Scott, I know it defaults to production if a environment is not specified. However, that''s not the case here. The client *is* specifying an environment, the server doesn''t know about that environment. I think this is different than what you are describing - if the client does not specify an environment, it is totally sane/correct to pass out the "production" manifests. However, if the client specifies an environment the server doesn''t know about, isn''t it at least worth warning about? --Paul On Mon, Mar 22, 2010 at 11:50 AM, Scott Smith <scott@ohlol.net> wrote:> On 3/22/10 10:27 AM, Paul Lathrop wrote: >> >> IMHO this is a bug, but I can see how it might be by design. Any >> comments? Should I file it? >> >> --Paul >> > > Don''t know if it''s a bug but... Yeah it defaults to "production" - you have > to create an empty manifest for "production" in order to prevent Very Scary > Things from occuring if you happen to also have a "production" Puppet env. > > -scott > > -- > 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.
I''d expect it to fail in such a way that the puppet run could not happen. Anything else could have worse consequences. J. On 22 March 2010 20:26, Paul Lathrop <paul.lathrop@gmail.com> wrote:> Scott, > > I know it defaults to production if a environment is not specified. > However, that''s not the case here. The client *is* specifying an > environment, the server doesn''t know about that environment. I think > this is different than what you are describing - if the client does > not specify an environment, it is totally sane/correct to pass out the > "production" manifests. However, if the client specifies an > environment the server doesn''t know about, isn''t it at least worth > warning about? > > --Paul > > On Mon, Mar 22, 2010 at 11:50 AM, Scott Smith <scott@ohlol.net> wrote: > > On 3/22/10 10:27 AM, Paul Lathrop wrote: > >> > >> IMHO this is a bug, but I can see how it might be by design. Any > >> comments? Should I file it? > >> > >> --Paul > >> > > > > Don''t know if it''s a bug but... Yeah it defaults to "production" - you > have > > to create an empty manifest for "production" in order to prevent Very > Scary > > Things from occuring if you happen to also have a "production" Puppet > env. > > > > -scott > > > > -- > > 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<puppet-users%2Bunsubscribe@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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Julian Simpson Software Build and Deployment http://www.build-doctor.com http://twitter.com/builddoctor -- 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.
On Mon, Mar 22, 2010 at 2:24 PM, Julian Simpson <simpsonjulian@gmail.com> wrote:> I''d expect it to fail in such a way that the puppet run could not happen. > Anything else could have worse consequences.++> J. > > On 22 March 2010 20:26, Paul Lathrop <paul.lathrop@gmail.com> wrote: >> >> Scott, >> >> I know it defaults to production if a environment is not specified. >> However, that''s not the case here. The client *is* specifying an >> environment, the server doesn''t know about that environment. I think >> this is different than what you are describing - if the client does >> not specify an environment, it is totally sane/correct to pass out the >> "production" manifests. However, if the client specifies an >> environment the server doesn''t know about, isn''t it at least worth >> warning about? >> >> --Paul >> >> On Mon, Mar 22, 2010 at 11:50 AM, Scott Smith <scott@ohlol.net> wrote: >> > On 3/22/10 10:27 AM, Paul Lathrop wrote: >> >> >> >> IMHO this is a bug, but I can see how it might be by design. Any >> >> comments? Should I file it? >> >> >> >> --Paul >> >> >> > >> > Don''t know if it''s a bug but... Yeah it defaults to "production" - you >> > have >> > to create an empty manifest for "production" in order to prevent Very >> > Scary >> > Things from occuring if you happen to also have a "production" Puppet >> > env. >> > >> > -scott >> > >> > -- >> > 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. >> > > > > -- > Julian Simpson > Software Build and Deployment > http://www.build-doctor.com > http://twitter.com/builddoctor > > -- > 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 -- 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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 23/03/10 7:26 AM, Paul Lathrop wrote:> Scott, > > I know it defaults to production if a environment is not specified. > However, that''s not the case here. The client *is* specifying an > environment, the server doesn''t know about that environment. I think > this is different than what you are describing - if the client does > not specify an environment, it is totally sane/correct to pass out the > "production" manifests. However, if the client specifies an > environment the server doesn''t know about, isn''t it at least worth > warning about?+1. Should fail with an appropriate warning. Smells like a bug to me. Regards James Turnbull - -- Author of: * Pro Linux System Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBS6fqQSFa/lDkFHAyAQJAGwf8D9RJMkCESZrkS9sBUKXaER+Sj0DzhK7R LUzUc1LL2boKjzAaCHJ86fM2kwSoFBAr/rD5hbCtMAhfP5o0tRo79X+evOLK+kPK jpk3aHL0sPpSGfUq9l5KaoumlNAZixYZZ9e38BkuLiYlwNfavVwxmN1os7Uhst96 UuI2GhXHwlDD+Nhu5b9QAomd2RArO91ujm1IC2cV3/kkfJ9UKvY121+Gt7QBSRas tmlMofj6g7kgs8HCD76X9BQAm0Ee97H72Klz1jUckhtYnpmgpnZDlnlms9ulM/Ea IBiUp2B3cRfgapOziEMSG6+z+ZKv9HFbGaa8s1SsxUMKlb7J7/1xUg==bMU4 -----END PGP SIGNATURE----- -- 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.
On 3/22/10 1:26 PM, Paul Lathrop wrote:> Scott, > > I know it defaults to production if a environment is not specified. > However, that''s not the case here. The client *is* specifying an > environment, the server doesn''t know about that environment. I think > this is different than what you are describing - if the client does > not specify an environment, it is totally sane/correct to pass out the > "production" manifests. However, if the client specifies an > environment the server doesn''t know about, isn''t it at least worth > warning about?Yeah, sorry--I was not clear in my agreement that it should probably behave differently. I did understand your problem and have observed it myself. The work around is to not use "production" and make it a stubbed environment with no real manifest. But yeah, +1 on wishing to see different behavior. -scott -- 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.
On Mon, Mar 22, 2010 at 6:25 PM, Scott Smith <scott@ohlol.net> wrote:> On 3/22/10 1:26 PM, Paul Lathrop wrote: >> >> Scott, >> >> I know it defaults to production if a environment is not specified. >> However, that''s not the case here. The client *is* specifying an >> environment, the server doesn''t know about that environment. I think >> this is different than what you are describing - if the client does >> not specify an environment, it is totally sane/correct to pass out the >> "production" manifests. However, if the client specifies an >> environment the server doesn''t know about, isn''t it at least worth >> warning about? > > Yeah, sorry--I was not clear in my agreement that it should probably behave > differently. I did understand your problem and have observed it myself. The > work around is to not use "production" and make it a stubbed environment > with no real manifest.I have a ''noop'' environment I default to, which logs to the server that someone has hit it, and I''m planning to monitor counts of that when I get around to it...> > But yeah, +1 on wishing to see different behavior. > > -scott > > -- > 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 -- 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.