Hi I have created virtual resource in my test module #-(root@puppet-master)-(/etc/puppet/modules/staging/test/manifests)-#> #-(0)> cat /etc/puppet/modules/staging/test/manifests/init.pp > > class export_file { > @@file { "/var/lib/puppet/test_file" : > content => "$fqdn" , > tag => "xxx" , > ensure => present , > } > @@file { "/tmp/export.$fqdn": content => "$fqdn.exported" , tag => > "xxx" , ensure => present , } > @@sshkey { $hostname: type => dsa , key => $sshdsakey } > Sshkey <<| |>> > } >Then I''m creating a base class to be included in base node #-(root@puppet-master)-(/etc/puppet/manifests/common/nodes)-#> #-(0)> cat /etc/puppet/manifests/common/nodes/nodes.pp > class base_node { > include ganglia_client > include bootstrap::common > include snmp > include cacti::client > include export_file > File <<| |>> > realize ( File["/usr/local/bin/iostat.pl"] , Cron["iostat"] ) > } > > > #-(root@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-# > #-(0)> cat nodes.pp > class lhb_basenode { > include base_node > include apache > include mysql::common > realize(Package["mysql-devel"]) > realize(Package["net-snmp-devel"]) > } > > node lhb-staging { > $project = ''lhb'' > $environment = ''staging'' > include lhb_basenode > } >After that I''m defining my host #-(root@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-#> #-(0)> cat hosts.pp > node "lhb-puppet.staging.internal.abc.com" inherits lhb-staging { > File <<| |>> > } >Similarly i define around 19 hosts in my nodes and hosts definitions . When i run puppet on my client nodes i can see the export_file being loaded in localconfig.yaml but that class doesn''t have any children . And the exported resources not being realized on it . [root@lhb-puppet puppet]# grep -B 2 -A 5 export_file localconfig.yaml> - !ruby/object:Puppet::TransBucket > type: Class > name: export_file > children: [] > > - !ruby/object:Puppet::TransBucket > type: Class > name: ganglia_client > -- > - snmp > - cacti::client > - export_file > - apache > - mysql::common >When i looked around in database i can see all the exported resources by every hosts in it. Attaching the output of mysql query "select * from resources where exported =1" I can''t understand where I''m wrong here , Please let me know if I''m not clear in explaining my problem . Thanks Saurabh Verma --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
saurabh verma
2009-May-20 07:23 UTC
[Puppet Users] Re: Puppet exported resources not working
Attaching mysql output On Wed, May 20, 2009 at 12:51 PM, saurabh verma <nitw.saurabh@gmail.com>wrote:> Hi > > I have created virtual resource in my test module > > #-(root@puppet-master)-(/etc/puppet/modules/staging/test/manifests)-# >> #-(0)> cat /etc/puppet/modules/staging/test/manifests/init.pp >> >> class export_file { >> @@file { "/var/lib/puppet/test_file" : >> content => "$fqdn" , >> tag => "xxx" , >> ensure => present , >> } >> @@file { "/tmp/export.$fqdn": content => "$fqdn.exported" , tag => >> "xxx" , ensure => present , } >> @@sshkey { $hostname: type => dsa , key => $sshdsakey } >> Sshkey <<| |>> >> } >> > > Then I''m creating a base class to be included in base node > > #-(root@puppet-master)-(/etc/puppet/manifests/common/nodes)-# >> #-(0)> cat /etc/puppet/manifests/common/nodes/nodes.pp >> class base_node { >> include ganglia_client >> include bootstrap::common >> include snmp >> include cacti::client >> include export_file >> File <<| |>> >> realize ( File["/usr/local/bin/iostat.pl"] , Cron["iostat"] ) >> } >> >> >> #-(root@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-# >> #-(0)> cat nodes.pp >> class lhb_basenode { >> include base_node >> include apache >> include mysql::common >> realize(Package["mysql-devel"]) >> realize(Package["net-snmp-devel"]) >> } >> >> node lhb-staging { >> $project = ''lhb'' >> $environment = ''staging'' >> include lhb_basenode >> } >> > > > After that I''m defining my host > > #-(root@puppet-master)-(/etc/puppet/manifests/lhb/nodes)-# >> #-(0)> cat hosts.pp >> node "lhb-puppet.staging.internal.abc.com" inherits lhb-staging { >> File <<| |>> >> } >> > > Similarly i define around 19 hosts in my nodes and hosts definitions . > When i run puppet on my client nodes i can see the export_file being loaded > in localconfig.yaml but that class doesn''t have any children . And the > exported resources not being realized on it . > > [root@lhb-puppet puppet]# grep -B 2 -A 5 export_file localconfig.yaml >> - !ruby/object:Puppet::TransBucket >> type: Class >> name: export_file >> children: [] >> >> - !ruby/object:Puppet::TransBucket >> type: Class >> name: ganglia_client >> -- >> - snmp >> - cacti::client >> - export_file >> - apache >> - mysql::common >> > > > When i looked around in database i can see all the exported resources by > every hosts in it. Attaching the output of mysql query "select * from > resources where exported =1" > > I can''t understand where I''m wrong here , Please let me know if I''m not > clear in explaining my problem . > > Thanks > Saurabh Verma > > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Brice Figureau
2009-May-20 14:49 UTC
[Puppet Users] Re: Puppet exported resources not working
On Wed, 2009-05-20 at 12:51 +0530, saurabh verma wrote:> Hi > > I have created virtual resource in my test module[snip]> I can''t understand where I''m wrong here , Please let me know if I''m > not clear in explaining my problem .You forgot something important, which version of puppet are you running on the puppetmaster? There were some version with storeconfigs issues, so I suggest you try the latest version available to see if your problem persists. -- Brice Figureau My Blog: http://www.masterzen.fr/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
saurabh verma
2009-May-26 12:20 UTC
[Puppet Users] Re: Puppet exported resources not working
I''m using latest version on all systems 24.8 include puppetmaster On Wed, May 20, 2009 at 8:19 PM, Brice Figureau < brice-puppet@daysofwonder.com> wrote:> > On Wed, 2009-05-20 at 12:51 +0530, saurabh verma wrote: > > Hi > > > > I have created virtual resource in my test module > [snip] > > I can''t understand where I''m wrong here , Please let me know if I''m > > not clear in explaining my problem . > > You forgot something important, which version of puppet are you running > on the puppetmaster? > > There were some version with storeconfigs issues, so I suggest you try > the latest version available to see if your problem persists. > -- > Brice Figureau > My Blog: http://www.masterzen.fr/ > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---