Attaching mysql output

On Wed, May 20, 2009 at 12:51 PM, saurabh verma <[email protected]>wrote:

> Hi
>
> I have created  virtual resource in my test module
>
> #-(r...@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
>
> #-(r...@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"] )
>> }
>>
>>
>> #-(r...@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
>
> #-(r...@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 .
>
> [r...@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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

mysql> select * from resources where exported = 1; 
+-----+--------------------------------------------------------------------+---------+---------+----------------+----------+------+---------------------+---------------------+
| id  | title                                                              | 
restype | host_id | source_file_id | exported | line | updated_at          | 
created_at          |
+-----+--------------------------------------------------------------------+---------+---------+----------------+----------+------+---------------------+---------------------+
|  77 | /var/lib/puppet/test_file                                          | 
File    |       3 |              9 |        1 |    5 | 2009-05-19 17:52:29 | 
2009-05-19 17:52:27 | 
| 222 | /var/lib/puppet/test_file                                          | 
File    |       1 |              9 |        1 |    6 | 2009-05-19 18:22:12 | 
2009-05-19 18:22:12 | 
| 224 | /tmp/export.lhb-puppet.staging.internal.abc.com                | File   
 |       3 |              9 |        1 |    7 | 2009-05-19 18:23:40 | 
2009-05-19 18:23:40 | 
| 225 | /var/lib/puppet/test_file                                          | 
File    |       5 |              9 |        1 |    6 | 2009-05-19 18:33:40 | 
2009-05-19 18:33:40 | 
| 226 | /tmp/export.obpooler-puppet.staging.internal.abc.com           | File   
 |       5 |              9 |        1 |    7 | 2009-05-19 18:33:40 | 
2009-05-19 18:33:40 | 
| 228 | /var/lib/puppet/test_file                                          | 
File    |       4 |              9 |        1 |    6 | 2009-05-19 18:36:12 | 
2009-05-19 18:36:12 | 
| 229 | /tmp/export.supersite-sessions-puppet.staging.internal.abc.com | File   
 |       4 |              9 |        1 |    7 | 2009-05-19 18:36:12 | 
2009-05-19 18:36:12 | 
| 231 | /tmp/export.bll-puppet.staging.internal.abc.com                | File   
 |       7 |              9 |        1 |    7 | 2009-05-19 18:42:09 | 
2009-05-19 18:42:09 | 
| 232 | /var/lib/puppet/test_file                                          | 
File    |       7 |              9 |        1 |    6 | 2009-05-19 18:42:09 | 
2009-05-19 18:42:09 | 
| 234 | /var/lib/puppet/test_file                                          | 
File    |       6 |              9 |        1 |    6 | 2009-05-19 18:42:51 | 
2009-05-19 18:42:51 | 
| 235 | /tmp/export.obweb-puppet.staging.internal.abc.com              | File   
 |       6 |              9 |        1 |    7 | 2009-05-19 18:42:51 | 
2009-05-19 18:42:51 | 
| 237 | /tmp/export.mpms-store-puppet.staging.internal.abc.com         | File   
 |       1 |              9 |        1 |    7 | 2009-05-19 18:52:21 | 
2009-05-19 18:52:21 | 
| 244 | lhb-puppet                                                         | 
Sshkey  |       3 |              9 |        1 |    8 | 2009-05-19 21:07:36 | 
2009-05-19 21:07:36 | 
| 245 | mpms-store-puppet                                                  | 
Sshkey  |       1 |              9 |        1 |    8 | 2009-05-19 21:07:46 | 
2009-05-19 21:07:46 | 
| 246 | obpooler-puppet                                                    | 
Sshkey  |       5 |              9 |        1 |    8 | 2009-05-19 21:07:54 | 
2009-05-19 21:07:54 | 
| 247 | supersite-sessions-puppet                                          | 
Sshkey  |       4 |              9 |        1 |    8 | 2009-05-19 21:08:00 | 
2009-05-19 21:08:00 | 
| 248 | obweb-puppet                                                       | 
Sshkey  |       6 |              9 |        1 |    8 | 2009-05-19 21:08:12 | 
2009-05-19 21:08:12 | 
| 249 | bll-puppet                                                         | 
Sshkey  |       7 |              9 |        1 |    8 | 2009-05-19 21:13:27 | 
2009-05-19 21:13:27 | 
| 258 | /tmp/export.obcron-puppet.staging.internal.abc.com             | File   
 |       8 |              9 |        1 |    7 | 2009-05-20 10:38:14 | 
2009-05-20 10:38:12 | 
| 262 | /var/lib/puppet/test_file                                          | 
File    |       8 |              9 |        1 |    6 | 2009-05-20 10:38:14 | 
2009-05-20 10:38:13 | 
| 271 | obcron-puppet                                                      | 
Sshkey  |       8 |              9 |        1 |    8 | 2009-05-20 10:38:14 | 
2009-05-20 10:38:13 | 
| 291 | /var/lib/puppet/test_file                                          | 
File    |       9 |              9 |        1 |    6 | 2009-05-20 10:39:55 | 
2009-05-20 10:39:53 | 
| 294 | /tmp/export.mailbox-puppet.staging.internal.abc.com            | File   
 |       9 |              9 |        1 |    7 | 2009-05-20 10:39:55 | 
2009-05-20 10:39:53 | 
| 305 | mailbox-puppet                                                     | 
Sshkey  |       9 |              9 |        1 |    8 | 2009-05-20 10:39:55 | 
2009-05-20 10:39:54 | 
| 325 | /var/lib/puppet/test_file                                          | 
File    |      10 |              9 |        1 |    6 | 2009-05-20 10:43:30 | 
2009-05-20 10:43:28 | 
| 337 | mailbox-bll-puppet                                                 | 
Sshkey  |      10 |              9 |        1 |    8 | 2009-05-20 10:43:30 | 
2009-05-20 10:43:29 | 
| 344 | /tmp/export.mailbox-bll-puppet.staging.internal.abc.com        | File   
 |      10 |              9 |        1 |    7 | 2009-05-20 10:43:30 | 
2009-05-20 10:43:29 | 
| 358 | /tmp/export.antispam-puppet.staging.internal.abc.com           | File   
 |      11 |              9 |        1 |    7 | 2009-05-20 11:10:32 | 
2009-05-20 11:10:32 | 
| 362 | /var/lib/puppet/test_file                                          | 
File    |      11 |              9 |        1 |    6 | 2009-05-20 11:10:32 | 
2009-05-20 11:10:32 | 
| 368 | antispam-puppet                                                    | 
Sshkey  |      11 |              9 |        1 |    8 | 2009-05-20 11:10:32 | 
2009-05-20 11:10:32 | 
| 393 | /var/lib/puppet/test_file                                          | 
File    |      12 |              9 |        1 |    6 | 2009-05-20 11:14:54 | 
2009-05-20 11:14:52 | 
| 394 | /tmp/export.obdb-puppet.staging.internal.abc.com               | File   
 |      12 |              9 |        1 |    7 | 2009-05-20 11:14:54 | 
2009-05-20 11:14:52 | 
| 406 | obdb-puppet                                                        | 
Sshkey  |      12 |              9 |        1 |    8 | 2009-05-20 11:14:54 | 
2009-05-20 11:14:53 | 
| 426 | /var/lib/puppet/test_file                                          | 
File    |      13 |              9 |        1 |    6 | 2009-05-20 11:15:43 | 
2009-05-20 11:15:41 | 
| 443 | /tmp/export.supersite-nfs-puppet.staging.internal.abc.com      | File   
 |      13 |              9 |        1 |    7 | 2009-05-20 11:15:43 | 
2009-05-20 11:15:42 | 
| 445 | supersite-nfs-puppet                                               | 
Sshkey  |      13 |              9 |        1 |    8 | 2009-05-20 11:15:43 | 
2009-05-20 11:15:43 | 
| 466 | /var/lib/puppet/test_file                                          | 
File    |      14 |              9 |        1 |    6 | 2009-05-20 11:20:48 | 
2009-05-20 11:20:43 | 
| 475 | /tmp/export.mpms-db-puppet.staging.internal.abc.com            | File   
 |      14 |              9 |        1 |    7 | 2009-05-20 11:20:48 | 
2009-05-20 11:20:44 | 
| 493 | mpms-db-puppet                                                     | 
Sshkey  |      14 |              9 |        1 |    8 | 2009-05-20 11:20:48 | 
2009-05-20 11:20:47 | 
| 517 | mpms-in-puppet                                                     | 
Sshkey  |      15 |              9 |        1 |    8 | 2009-05-20 11:23:10 | 
2009-05-20 11:23:07 | 
| 524 | /var/lib/puppet/test_file                                          | 
File    |      15 |              9 |        1 |    6 | 2009-05-20 11:23:10 | 
2009-05-20 11:23:07 | 
| 527 | /tmp/export.mpms-in-puppet.staging.internal.abc.com            | File   
 |      15 |              9 |        1 |    7 | 2009-05-20 11:23:10 | 
2009-05-20 11:23:08 | 
| 580 | /var/lib/puppet/test_file                                          | 
File    |      16 |              9 |        1 |    6 | 2009-05-20 11:24:31 | 
2009-05-20 11:24:28 | 
| 609 | /tmp/export.mpms-out-puppet.staging.internal.abc.com           | File   
 |      16 |              9 |        1 |    7 | 2009-05-20 11:24:31 | 
2009-05-20 11:24:30 | 
| 611 | mpms-out-puppet                                                    | 
Sshkey  |      16 |              9 |        1 |    8 | 2009-05-20 11:24:31 | 
2009-05-20 11:24:30 | 
| 629 | /var/lib/puppet/test_file                                          | 
File    |      17 |              9 |        1 |    6 | 2009-05-20 12:10:17 | 
2009-05-20 12:10:17 | 
| 640 | /tmp/export.chat-puppet.staging.internal.abc.com               | File   
 |      17 |              9 |        1 |    7 | 2009-05-20 12:10:18 | 
2009-05-20 12:10:18 | 
| 641 | chat-puppet                                                        | 
Sshkey  |      17 |              9 |        1 |    8 | 2009-05-20 12:10:18 | 
2009-05-20 12:10:18 | 
| 662 | /var/lib/puppet/test_file                                          | 
File    |      18 |              9 |        1 |    6 | 2009-05-20 12:17:08 | 
2009-05-20 12:17:08 | 
| 666 | dfwd-puppet                                                        | 
Sshkey  |      18 |              9 |        1 |    8 | 2009-05-20 12:17:08 | 
2009-05-20 12:17:08 | 
| 670 | /tmp/export.dfwd-puppet.staging.internal.abc.com               | File   
 |      18 |              9 |        1 |    7 | 2009-05-20 12:17:08 | 
2009-05-20 12:17:08 | 
| 689 | skenzoweb-puppet                                                   | 
Sshkey  |      19 |              9 |        1 |    8 | 2009-05-20 12:20:53 | 
2009-05-20 12:20:51 | 
| 695 | /var/lib/puppet/test_file                                          | 
File    |      19 |              9 |        1 |    6 | 2009-05-20 12:20:53 | 
2009-05-20 12:20:51 | 
| 714 | /tmp/export.skenzoweb-puppet.staging.internal.abc.com          | File   
 |      19 |              9 |        1 |    7 | 2009-05-20 12:20:53 | 
2009-05-20 12:20:52 | 
+-----+--------------------------------------------------------------------+---------+---------+----------------+----------+------+---------------------+---------------------+
54 rows in set (0.00 sec)

Reply via email to