TORO
2012-Aug-06 10:32 UTC
[Puppet Users] new module created , but does not load ( is ignored)
Hope someone can help, ( not sure if this is the right place ... as I´m new to this group) I have created a new module ( see snipped from tree below ) but its not used and no error is reported . looks like its not recognized by the puppetd I have run this on a puppet - node puppetd --test --verbose --noop --evaltrace --environment testing respect. puppetd --test --verbose --noop --evaltrace --environment testing | grep probe but it does not show any output refering to my new module on the master: /etc/puppet . |-- auth.conf |-- autosign.conf |-- fileserver.conf |-- local | `-- facts.yaml |-- production | |-- manifests | | |-- site.pp ----snip------- `-- testing |-- manifests | `-- site.pp `-- modules |-- itrs_probe | |-- README | |-- files | | `-- oel | | `-- start_netprobe_inf | `-- manifests | |-- init.pp | `-- oel.pp The init.pp defines the class itrs_probe and callls the subclass oel.pp Thanks for any remarks that may help Reg. TORO -- 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/-/JXDXBOK-hf8J. 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.
Ken Barber
2012-Aug-06 18:16 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
> Hope someone can help, ( not sure if this is the right place ... as I´m new > to this group)Yes - this is the correct place.> I have created a new module ( see snipped from tree below ) but its not > used and no error is reported . looks like its not recognized by the puppetdProbably a silly question, but worth asking regardless: How are you including the class? Are you able to show us the file (using gist.github.com or some other form of file pasting is preferred) where this is included? I presume this is in testing/manifests/site.pp ... for example the class should be included somewhere else either using the syntax: include ''itrs_probe'' or alternatively: class { ''itrs_probe'': } ... or you might be using an ENC to do that which means the class needs to be included for the node in question.> I have run this on a puppet - node > > puppetd --test --verbose --noop --evaltrace --environment testing > > respect. > > puppetd --test --verbose --noop --evaltrace --environment testing | grep > probe > > but it does not show any output refering to my new moduleAdding a notify resource inside your class often helps to emit results for debugging purposes. So in your file test/modules/itrs_probe/manifests/init.pp something like: class ''itrs_probe'' { notify { ''inside itrs_probe'': } ... snip ... } Should emit a message when the class is included. An example of this output would be available if you ran something like this on the puppet master: puppet apply -e ''include itrs_probe'' --modulepath ''/etc/puppet/testing/modules'' Potentially - we''d probably need to see the contents of your init.pp and oel.pp to elude what is happening - is it possible to show us that?> on the master: > /etc/puppet > > . > |-- auth.conf > |-- autosign.conf > |-- fileserver.conf > |-- local > | `-- facts.yaml > |-- production > | |-- manifests > | | |-- site.pp > ----snip------- > `-- testing > |-- manifests > | `-- site.pp > `-- modules > |-- itrs_probe > | |-- README > | |-- files > | | `-- oel > | | `-- start_netprobe_inf > | `-- manifests > | |-- init.pp > | `-- oel.pp > The init.pp defines the class itrs_probe and callls the subclass oel.ppThe fact that you say no error or message is returned tells me that either: a) the contents of the class was executed already, and is therefore exposing nothing as nothing needs to be changed (unlikely) or b) the class itself is not being included properly elsewhere. Adding a notify should prove/disprove either case. Another way to see if your class was proper included is to check the classes.txt file in /var/lib/puppet/state/classes.txt on the agent. (there are other methods, but these two are simple) ken. -- 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.
TORO
2012-Aug-07 07:47 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
Am Montag, 6. August 2012 20:16:35 UTC+2 schrieb Ken Barber:> > > Hope someone can help, ( not sure if this is the right place ... as I´m > new > > to this group) > > Yes - this is the correct place. > > > I have created a new module ( see snipped from tree below ) but its not > > used and no error is reported . looks like its not recognized by the > puppetd > > Probably a silly question, but worth asking regardless: How are you > including the class? Are you able to show us the file (using > gist.github.com or some other form of file pasting is preferred) where > this is included? I presume this is in testing/manifests/site.pp ... > for example the class should be included somewhere else either using > the syntax: > > include ''itrs_probe'' > > or alternatively: > > class { ''itrs_probe'': > } > > ... or you might be using an ENC to do that which means the class > needs to be included for the node in question. > > > I have run this on a puppet - node > > > > puppetd --test --verbose --noop --evaltrace --environment testing > > > > respect. > > > > puppetd --test --verbose --noop --evaltrace --environment testing | grep > > probe > > > > but it does not show any output refering to my new module > > Adding a notify resource inside your class often helps to emit results > for debugging purposes. So in your file > test/modules/itrs_probe/manifests/init.pp something like: > > class ''itrs_probe'' { > notify { ''inside itrs_probe'': } > ... snip ... > } > > Should emit a message when the class is included. An example of this > output would be available if you ran something like this on the puppet > master: > > puppet apply -e ''include itrs_probe'' --modulepath > ''/etc/puppet/testing/modules'' > > Potentially - we''d probably need to see the contents of your init.pp > and oel.pp to elude what is happening - is it possible to show us > that? > > > on the master: > > /etc/puppet > > > > . > > |-- auth.conf > > |-- autosign.conf > > |-- fileserver.conf > > |-- local > > | `-- facts.yaml > > |-- production > > | |-- manifests > > | | |-- site.pp > > ----snip------- > > `-- testing > > |-- manifests > > | `-- site.pp > > `-- modules > > |-- itrs_probe > > | |-- README > > | |-- files > > | | `-- oel > > | | `-- start_netprobe_inf > > | `-- manifests > > | |-- init.pp > > | `-- oel.pp > > The init.pp defines the class itrs_probe and callls the subclass oel.pp > > The fact that you say no error or message is returned tells me that > either: a) the contents of the class was executed already, and is > therefore exposing nothing as nothing needs to be changed (unlikely) > or b) the class itself is not being included properly elsewhere. > > Adding a notify should prove/disprove either case. Another way to see > if your class was proper included is to check the classes.txt file in > /var/lib/puppet/state/classes.txt on the agent. (there are other > methods, but these two are simple) > > ken. >Thanks Ken for your help : )) thought I had alredy replied .... Yes you are right , :> > b) the class itself is not being included properly elsewhereas it is not listed i/var/lib/puppet/state/classes.txt And Yes you are right , I should have attached my init.pp and oel.pp see now below: [root@ldn-lx-puppet01 manifests]# pwd /etc/puppet/testing/modules/itrs_probe/manifests [root@ldn-lx-puppet01 manifests]# [root@ldn-lx-puppet01 manifests]# more *.pp :::::::::::::: init.pp :::::::::::::: class itrs_probe () inherits local::conf { notify { ''inside itrs_probe'': } case $operatingsystem { /OEL|RedHat/: { class { ''itrs_probe::oel'': } } default: { } } } :::::::::::::: oel.pp :::::::::::::: class itrs_probe::oel ($region=''london''){ package { ''Global_NetProbe'': ensure => installed, } file { ''/opt/NetProbe/start_netprobe_app'': owner => root, group => root, mode => 755, ensure => present, source => [ "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_app", "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_app", "puppet:///modules/itrs_probe/oel/start_netprobe_app", ] } file { ''/opt/NetProbe/start_netprobe_inf'': owner => root, group => root, mode => 755, ensure => present, require => File[''/opt/NetProbe''], source => [ "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_inf", "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_inf", "puppet:///modules/itrs_probe/oel/start_netprobe_inf", ] } service { ''netprobe_app'': enable => true, } service { ''netprobe_inf'': enable => true, } Package[''Global_NetProbe''] -> File[''/opt/NetProbe/start_netprobe_app''] -> Service[''netprobe_app''] Package[''Global_NetProbe''] -> File[''/opt/NetProbe/start_netprobe_inf''] -> Service[''netprobe_inf''] } [root@ldn-lx-puppet01 manifests]# Thanks & Regards -- 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/-/QKCXzgqp0noJ. 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.
TORO
2012-Aug-07 07:50 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
Am Dienstag, 7. August 2012 09:47:05 UTC+2 schrieb TORO:> > > Am Montag, 6. August 2012 20:16:35 UTC+2 schrieb Ken Barber: >> >> > Hope someone can help, ( not sure if this is the right place ... as >> I´m new >> > to this group) >> >> Yes - this is the correct place. >> >> > I have created a new module ( see snipped from tree below ) but its >> not >> > used and no error is reported . looks like its not recognized by the >> puppetd >> >> Probably a silly question, but worth asking regardless: How are you >> including the class? Are you able to show us the file (using >> gist.github.com or some other form of file pasting is preferred) where >> this is included? I presume this is in testing/manifests/site.pp ... >> for example the class should be included somewhere else either using >> the syntax: >> >> include ''itrs_probe'' >> >> or alternatively: >> >> class { ''itrs_probe'': >> } >> >> ... or you might be using an ENC to do that which means the class >> needs to be included for the node in question. >> >> > I have run this on a puppet - node >> > >> > puppetd --test --verbose --noop --evaltrace --environment testing >> > >> > respect. >> > >> > puppetd --test --verbose --noop --evaltrace --environment testing | >> grep >> > probe >> > >> > but it does not show any output refering to my new module >> >> Adding a notify resource inside your class often helps to emit results >> for debugging purposes. So in your file >> test/modules/itrs_probe/manifests/init.pp something like: >> >> class ''itrs_probe'' { >> notify { ''inside itrs_probe'': } >> ... snip ... >> } >> >> Should emit a message when the class is included. An example of this >> output would be available if you ran something like this on the puppet >> master: >> >> puppet apply -e ''include itrs_probe'' --modulepath >> ''/etc/puppet/testing/modules'' >> >> Potentially - we''d probably need to see the contents of your init.pp >> and oel.pp to elude what is happening - is it possible to show us >> that? >> >> > on the master: >> > /etc/puppet >> > >> > . >> > |-- auth.conf >> > |-- autosign.conf >> > |-- fileserver.conf >> > |-- local >> > | `-- facts.yaml >> > |-- production >> > | |-- manifests >> > | | |-- site.pp >> > ----snip------- >> > `-- testing >> > |-- manifests >> > | `-- site.pp >> > `-- modules >> > |-- itrs_probe >> > | |-- README >> > | |-- files >> > | | `-- oel >> > | | `-- start_netprobe_inf >> > | `-- manifests >> > | |-- init.pp >> > | `-- oel.pp >> > The init.pp defines the class itrs_probe and callls the subclass >> oel.pp >> >> The fact that you say no error or message is returned tells me that >> either: a) the contents of the class was executed already, and is >> therefore exposing nothing as nothing needs to be changed (unlikely) >> or b) the class itself is not being included properly elsewhere. >> >> Adding a notify should prove/disprove either case. Another way to see >> if your class was proper included is to check the classes.txt file in >> /var/lib/puppet/state/classes.txt on the agent. (there are other >> methods, but these two are simple) >> >> ken. >> > > Thanks Ken for your help > > : )) thought I had alredy replied .... > > Yes you are right , : > >> b) the class itself is not being included properly elsewhere > > as it is not listed i > /var/lib/puppet/state/classes.txt > > And Yes you are right , I should have attached my init.pp and oel.pp see > now below: > > [root@ldn-lx-puppet01 manifests]# pwd > > /etc/puppet/testing/modules/itrs_probe/manifests > > [root@ldn-lx-puppet01 manifests]# > > [root@ldn-lx-puppet01 manifests]# more *.pp > > :::::::::::::: > > init.pp > > :::::::::::::: > > class itrs_probe () inherits local::conf { > > notify { ''inside itrs_probe'': } > > case $operatingsystem { > > /OEL|RedHat/: { class { ''itrs_probe::oel'': } > > } > > default: { } > > } > > } > > :::::::::::::: > > oel.pp > > :::::::::::::: > > class itrs_probe::oel ($region=''london''){ > > package { ''Global_NetProbe'': > > ensure => installed, > > } > > file { ''/opt/NetProbe/start_netprobe_app'': > > owner => root, > > group => root, > > mode => 755, > > ensure => present, > > source => [ > "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_app", > > "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_app", > > "puppet:///modules/itrs_probe/oel/start_netprobe_app", > > ] > > } > > file { ''/opt/NetProbe/start_netprobe_inf'': > > owner => root, > > group => root, > > mode => 755, > > ensure => present, > > require => File[''/opt/NetProbe''], > > source => [ > "puppet:///modules/itrs_probe/oel/${hostname}.start_netprobe_inf", > > "puppet:///modules/itrs_probe/oel/${region}.start_netprobe_inf", > > "puppet:///modules/itrs_probe/oel/start_netprobe_inf", > > ] > > } > > service { ''netprobe_app'': > > enable => true, > > } > > service { ''netprobe_inf'': > > enable => true, > > } > > Package[''Global_NetProbe''] -> File[''/opt/NetProbe/start_netprobe_app''] > -> Service[''netprobe_app''] > > Package[''Global_NetProbe''] -> File[''/opt/NetProbe/start_netprobe_inf''] -> > Service[''netprobe_inf''] > > } > > [root@ldn-lx-puppet01 manifests]# > > Thanks & Regards > >-- 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/-/GPB2NzgLNXgJ. 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
2012-Aug-07 13:08 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
On Tuesday, August 7, 2012 2:47:05 AM UTC-5, TORO wrote:> > Yes you are right , : > >> b) the class itself is not being included properly elsewhere > > as it is not listed i > /var/lib/puppet/state/classes.txt > > And Yes you are right , I should have attached my init.pp and oel.pp see > now below: >No, if the the node''s catalog compiles correctly, but the class is not included, then the problem is not with the class''s own manifest(s). Ken described the most common ways in which class ''itrs_probe'' could be assigned to your node; are you using one of those? John -- 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/-/vUp7NnWhktUJ. 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.
TORO
2012-Aug-07 14:21 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
Am Dienstag, 7. August 2012 15:08:38 UTC+2 schrieb jcbollinger:> > > > On Tuesday, August 7, 2012 2:47:05 AM UTC-5, TORO wrote: >> >> Yes you are right , : >> >>> b) the class itself is not being included properly elsewhere >> >> as it is not listed i >> /var/lib/puppet/state/classes.txt >> >> And Yes you are right , I should have attached my init.pp and oel.pp see >> now below: >> > > No, if the the node''s catalog compiles correctly, but the class is not > included, then the problem is not with the class''s own manifest(s). Ken > described the most common ways in which class ''itrs_probe'' could be > assigned to your node; are you using one of those? > > > John > > He John ,Thanks for Your comment. But now I´m totally lost. I have to admit, the puppet server was already set up and working with a bunch of modules when I take over ( I have not set puppet up myself....and do not have many experience with Puppet !) So I had expected to create new path under modules e.g......testing /modules/itrs_prob/ { files, templates, manifests} and then put a init.pp and the oel.pp into manifests should let puppet deploy my stuff. This seems not to be the case. For testing I made again a new modul (/dummy/ { files, templates, manifests} and also put an init.pp in to manifests . (this init pp) class dummy () { notify { ''inside dummy'': } } I had expected to see something like this ...what I have tested on a other already working modul ... it additionally send the notify .... notice: /Stage[main]/Altiris_client/Notify[inside altiris_client]/message: current_value absent, should be inside altiris_client (noop) But the notify for dummy does not appear ... How do I add my new modules to get deploy ... ( where dummy is not required it does nothing ... but my itrs_probe needed) Greetings -- 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/-/Fe1FbY2ItMYJ. 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
2012-Aug-08 14:06 UTC
Re: [Puppet Users] new module created , but does not load ( is ignored)
On Tuesday, August 7, 2012 9:21:10 AM UTC-5, TORO wrote:> > > Am Dienstag, 7. August 2012 15:08:38 UTC+2 schrieb jcbollinger: >> >> >> >> On Tuesday, August 7, 2012 2:47:05 AM UTC-5, TORO wrote: >>> >>> Yes you are right , : >>> >>>> b) the class itself is not being included properly elsewhere >>> >>> as it is not listed i >>> /var/lib/puppet/state/classes.txt >>> >>> And Yes you are right , I should have attached my init.pp and oel.pp see >>> now below: >>> >> >> No, if the the node''s catalog compiles correctly, but the class is not >> included, then the problem is not with the class''s own manifest(s). Ken >> described the most common ways in which class ''itrs_probe'' could be >> assigned to your node; are you using one of those? >> >> >> John >> >> He John , > > Thanks for Your comment. But now I´m totally lost. > > I have to admit, the puppet server was already set up and working with a > bunch of modules when I take over ( I have not set puppet up myself....and > do not have many experience with Puppet !) > > So I had expected to create new path under modules e.g......testing > /modules/itrs_prob/ { files, templates, manifests} and then put a init.pp > and the oel.pp into manifests should let puppet deploy my stuff. > > This seems not to be the case. > > For testing I made again a new modul (/dummy/ { files, templates, > manifests} and also put an init.pp in to manifests . > > (this init pp) > > class dummy () { > > notify { ''inside dummy'': } > > } > > I had expected to see something like this ...what I have tested on a > other already working modul ... it additionally send the notify .... > > notice: /Stage[main]/Altiris_client/Notify[inside altiris_client]/message: > current_value absent, should be inside altiris_client (noop) > > But the notify for dummy does not appear ... > > How do I add my new modules to get deploy ... ( where dummy is not > required it does nothing ... but my itrs_probe needed) >What you are missing is that Puppet does not automatically deploy all available modules to all nodes. It must be told which classes of which modules to assign to each node. This is a good thing, for otherwise every node would have to be configured the same way. The assignments of classes to nodes may appear, either at top level or in a ''node'' declaration block matching the target node, in the site-wide root manifest "site.pp" or a manifest ''import''ed directly or indirectly by it. Ken described how those might look. Alternatively, Puppet may assign classes to nodes based on the output of an "external node classifier" (ENC) program that someone set up for your site. Additionally, classes may add other classes (as your its_probe class does), provided they themselves are assigned to the target node by one of the available means. I can''t tell you exactly what to do because I can''t tell what mode(s) of class assignment your site is using, nor which of your nodes are supposed to get the classes you have created. I urge you to invest some time in learning at least the fundamentals of your tools (Puppet, in this case). Puppet has on-line documentation and tools that will carry you a long way: http://docs.puppetlabs.com/#puppetpuppet. I would recommend either the Learning Puppet series or the Language Guide (or both). The former may be a bit more accessible, but if you''re up to it then the latter may be more comprehensive. John -- 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/-/m9Bx-BT-wgcJ. 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.