On Wednesday, February 6, 2013 11:10:28 AM UTC-6, David Kerr wrote:
>
>
>>> So you were looking for different nodes to export fragments with 
>> different sequence numbers embedded in the content?  That was SO never 
>> going to work.  Every node's catalog is compiled independently of all the 
>> others'.  Even collecting exported resources isn't really an exception to 
>> that rule.
>>
>
> No, I had hoped that each node would export and then when it was realized 
> the virtual resources on the Pool machine <<| |>>
> i would be able to latch onto that loop and generate a sequence then. 
>  
>
>> You could do what you wanted via exported resources if Puppet provided 
>> for exporting data, but it does not.  Only resources may be exported, and 
>> there is no public API by which one resource implementation may interrogate 
>> others.
>>
>
> It's kind of a bummer, because the data that I need is there. I just need 
> to be able to count them.
>  
>
>>
>> If you want to generate a sequence of consecutive numbers then it will 
>> need to be done either manually (outside Puppet, at least) or all on one 
>> node.  Either form will be easier to manage if you centralize your data in 
>> a class variable, hiera store, or similar.  Supposing that by some means 
>> you obtain a data structure similar to this:
>>
>> {
>>   '192.168.1.10' => {
>>     port => 5432,
>>     weight = 1
>>     data_directory = '/db/pg'
>>     flag = 'ALLOW_TO_FAILOVER'
>>   },
>>   '192.168.1.11' => {
>>     port => 5432,
>>     weight = 1
>>     data_directory = '/db/pg'
>>     flag = 'ALLOW_TO_FAILOVER'
>>   },
>>   ...
>> }
>>
>> your pg server nodes can read their own, individual configuration 
>> parameters from it (even to determining that they should *be* pg 
>> servers), whereas the pool server can process the whole thing in one 
>> template to produce the server section of the pool config file.
>>
>>
> I have:
> define pgpool::postgres_backend (
>   $ipaddress        = $::ipaddress,
>   $environment      = environment,
>   $pgdata           = '/db/pg',
>   $pgport           = '5432',
> ) {  }
>
>
> and that gets called from each DB server:
>   @@pgpool::postgres_backend { "$fqdn":
>     ipaddress     => "$ipaddress",
>     environment   => "$environment",
>   }
>
> looping over that construct is what I'm not sure how to do.
>


As I said, Puppet provides no public API by which you could probe the 
properties of the collected pgpool::postgres_backend instances.  Nodes 
cannot export data.  I understand that your attempt is neat and tidy, but 
you can't do it that way.  That's why I recommended taking a different 
approach.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to