Hi all, I''m noticing that all classes I have created are being applied to every node, even ones that don''t specifically "include" them. There is no inheritance occurring that would allow this to happen. I''ve been reading docs and couldn''t find anything about this... Am I missing something obvious? Let me know if you need more info # puppetd --version 2.6.8 # puppetmasterd --version 2.6.8 # gem list *** LOCAL GEMS *** actionmailer (2.2.2) actionpack (2.2.2) activerecord (2.3.5, 2.2.2) activeresource (2.2.2) activesupport (2.3.5, 2.2.2) json (1.5.3) mime-types (1.16) rails (2.2.2) rake (0.8.7) rest-client (1.6.3) sqlite3-ruby (1.2.4) # ruby -v ruby 1.8.5 (2006-08-25) [x86_64-linux] # cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.6 (Tikanga) -- 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,
Sounds like they are being included somewhere in your manifest.
I''ve had similar issues when one of my tests was failing, eg:
if $something { include someclass }
else { include otherclass }
You can try to look at the --graph option to see if that helps track it down.
See the FAQ for more on this.
Cheers,
Den
On 12/07/2011, at 1:52, Zach <zachary.g.armstrong@gmail.com> wrote:
> Hi all,
>
> I''m noticing that all classes I have created are being applied to
> every node, even ones that don''t specifically "include"
them. There
> is no inheritance occurring that would allow this to happen. I''ve
> been reading docs and couldn''t find anything about this... Am I
> missing something obvious? Let me know if you need more info
>
>
> # puppetd --version
> 2.6.8
>
> # puppetmasterd --version
> 2.6.8
>
> # gem list
>
> *** LOCAL GEMS ***
>
> actionmailer (2.2.2)
> actionpack (2.2.2)
> activerecord (2.3.5, 2.2.2)
> activeresource (2.2.2)
> activesupport (2.3.5, 2.2.2)
> json (1.5.3)
> mime-types (1.16)
> rails (2.2.2)
> rake (0.8.7)
> rest-client (1.6.3)
> sqlite3-ruby (1.2.4)
>
>
> # ruby -v
> ruby 1.8.5 (2006-08-25) [x86_64-linux]
>
> # cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 5.6 (Tikanga)
>
> --
> 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.
On Jul 11, 10:52 am, Zach <zachary.g.armstr...@gmail.com> wrote:> Hi all, > > I''m noticing that all classes I have created are being applied to > every node, even ones that don''t specifically "include" them. There > is no inheritance occurring that would allow this to happen. I''ve > been reading docs and couldn''t find anything about this... Am I > missing something obvious? Let me know if you need more infoThe problem is far more likely to be in your manifests than to be in Puppet, but without seeing the manifests we can only speculate. My best guess is that you have top-level "include" statements in one or more of your manifests, perhaps where you meant "import" instead. It may also be that some of your classes are including others, with the result that all classes get pulled in even though some are not explicitly included at node level. 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.
You guys got me on the right track... Turns out I was running into
this:
"One of THE MOST DIFFICULT concepts to understand for puppet newbies
is that these two things are identical:
include foo
class { ''foo'': }"
In my case, I was declaring things like:
class { "nagios::webserver": stage => post }
at the very top of the site.pp
Is there a better way to declare what stage a class belongs to within
the class declaration itself?
Right now, I am doing something like this:
node webserver01...12 inherits default {
class { "nagios::webserver": stage => post }
include apache::apache_security
include apache::php_security
include apache::apache_conf_webserver
}
It''s pretty ugly to have to keep declaring the stage in every node
group (I have webservers, app servers, etc)
On Jul 12, 9:21 am, jcbollinger <John.Bollin...@stJude.org>
wrote:> On Jul 11, 10:52 am, Zach <zachary.g.armstr...@gmail.com> wrote:
>
> > Hi all,
>
> > I''m noticing that all classes I have created are being
applied to
> > every node, even ones that don''t specifically
"include" them. There
> > is no inheritance occurring that would allow this to happen.
I''ve
> > been reading docs and couldn''t find anything about this...
Am I
> > missing something obvious? Let me know if you need more info
>
> The problem is far more likely to be in your manifests than to be in
> Puppet, but without seeing the manifests we can only speculate. My
> best guess is that you have top-level "include" statements in one
or
> more of your manifests, perhaps where you meant "import" instead.
It
> may also be that some of your classes are including others, with the
> result that all classes get pulled in even though some are not
> explicitly included at node level.
>
> 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.
Jacob Helwig
2011-Jul-12 15:06 UTC
Re: [Puppet Users] Re: all classes applied to every node
Zach <zachary.g.armstrong@gmail.com> wrote:
You guys got me on the right track... Turns out I was running into
this:
"One of THE MOST DIFFICULT concepts to understand for puppet newbies
is that these two things are identical:
include foo
class { ''foo'': }"
In my case, I was declaring things like:
class { "nagios::webserver": stage => post }
at the very top of the site.pp
Is there a better way to declare what stage a class belongs to within
the class declaration itself?
Right now, I am doing something like this:
node webserver01...12 inherits default {
class { "nagios::webserver": stage => post }
include apache::apache_security
include apache::php_security
include apache::apache_conf_webserver
}
It''s pretty ugly to have to keep declaring the stage in every node
group (I have webservers, app servers, etc)
On Jul 12, 9:21 am, jcbollinger <John.Bollin...@stJude.org>
wrote:> On Jul 11, 10:52 am, Zach <zachary.g.armstr...@gmail.com> wrote:
>
> > Hi all,
>
> > I''m noticing that all classes I have created are being
applied to
> > every node, even ones that don''t specifically
"include" them. There
> > is no inheritance occurring that would allow this to happen.
I''ve
> > been reading docs and couldn''t find anything about this...
Am I
> > missing something obvious? Let me know if you need more info
>
> The problem is far more likely to be in your manifests than to be in
> Puppet, but without seeing the manifests we can only speculate. My
> best guess is that you have top-level "include" statements in one
or
> more of your manifests, perhaps where you meant "import" instead.
It
> may also be that some of your classes are including others, with the
> result that all classes get pulled in even though some are not
> explicitly included at node level.
>
> 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.
You should be able to set the default stage just like any other parameter. Jesse
and I fixed that a while back. Forget which version it''s fixed in
though.
--
Sent from my phone. Please excuse my brevity.
--
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.
Thanks! I had the same issue. Works out well.
node webserver01...12 inherits default {
class { "nagios::webserver": stage => post }
include apache::apache_security
include apache::php_security
include apache::apache_conf_webserver
}
Am Dienstag, 12. Juli 2011 17:06:53 UTC+2 schrieb Jacob
Helwig:>
> Zach <zachary.g...@gmail.com <javascript:>> wrote:
>>
>> You guys got me on the right track... Turns out I was running into
>> this:
>>
>> "One of THE MOST DIFFICULT concepts to understand for puppet
newbies
>> is that these two things are identical:
>>
>> include foo
>> class { ''foo'': }"
>>
>> In my case, I was declaring things like:
>> class { "nagios::webserver": stage => post }
>> at the very top of the site.pp
>>
>> Is there a better way to declare what stage a class belongs to within
>> the class declaration itself?
>>
>> Right now, I am doing something like this:
>>
>> node webserver01...12 inherits default {
>> class { "nagios::webserver": stage => post }
>> include apache::apache_security
>> include apache::php_security
>> include apache::apache_conf_webserver
>> }
>>
>> It''s pretty ugly to have to keep declaring the stage in every
node
>> group (I have webservers,
>> app servers, etc)
>>
>> On Jul 12, 9:21 am, jcbollinger <John.Bollin...@stJude.org>
wrote:
>> > On Jul 11, 10:52 am, Zach <zachary.g.armstr...@gmail.com>
wrote:
>> >
>> > > Hi all,
>> >
>> > > I''m noticing that all classes I have created are
being applied to
>> > > every node, even ones that don''t specifically
"include" them. There
>> > > is no inheritance occurring that would allow this to happen.
I''ve
>> > > been reading docs and couldn''t find anything about
this... Am I
>> > > missing something obvious? Let me know if you need more
info
>> >
>> > The problem is far more likely to be in your manifests than to be
in
>> > Puppet, but without seeing the manifests we can only speculate.
My
>> > best guess is that you have top-level "include"
statements in one or
>> > more of your manifests, perhaps where you meant "import"
instead. It
>> > may also be that some
>> of your classes are including others, with the
>> > result that all classes get pulled in even though some are not
>> > explicitly included at node level.
>> >
>> > 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...@googlegroups.com
<javascript:>.
>> To unsubscribe from this group, send email to
puppet-users...@googlegroups.com <javascript:>.
>> For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>>
>>
> You should be able to set the default stage just like any other parameter.
> Jesse and I fixed that a while back. Forget which version it''s
fixed in
> though.
> --
> Sent from my phone. Please excuse my brevity.
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/JH1tEQde668J.
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.