[pgpool-general: 1657] Re: Config file suggestion / request
web at mr-paradox.net
web at mr-paradox.net
Tue Apr 23 07:14:31 JST 2013
Yes, I tried going through the loops in a template, but
it didn't really work well with puppet's exported resources.
Specifically because when you instantiate the exported resources you
don't get an array, you just get your exported resource exeucted 'n' times.
In that case the loop counter would always be zero
In your environment are you using exported resources? If so I'd love to see
how you handle the <<| |>> portion.
On Mon, Apr 22, 2013 at 11:36:15PM +0200, Maik Kulbe wrote:
- I use Puppet myself for a small test cluster and I haven't had a huge
- problem, even though I was new to puppet. You can make a template with a
- loop and a counter variable that just echos this variable into the sections
- in the config. That way you have just one block of template code. It's
- fairly simple to implement, really.
- Just take a look at
- http://docs.puppetlabs.com/guides/templating.html#iteration - it is just a
- simple ruby loop.
- I think it would be better to provide templates or classes for the most
- populare management engines, like Puppet and Chef, than to make big changes
- to how the config is handled and thus breaking public API consistency
- throughout the versions.
- >I have a request for a change to the way the config files are handled.
- >Right now, the way the config file works it is very difficult to
- >dynamically add / remove nodes programmatically. (i.e., via Puppet/Chef,
- >Which I think would be a huge boost to pgpool's popularity and
- >usefulness to
- >be able to do this.
- >I currently use it to load balance nodes in Amazon and it works fine, if
- >i could
- >programmatically add and remove nodes then it would be perfect.
- >The key problem is the way that each stanza is identified (the
- >sequential values
- >at the end of the parameter name) backend_hostname0, backend_hostname1,
- >That structure is very difficult to create via puppet.
- >There are plenty of ways to solve this, but I think the current
- >way would be the "conf.d/*" pattern. Where each node would have a file
- >a conf.d/ directory and then the primary config file would import all
- >in that directory. (similar to apache/nginx/etc)
- >So under etc/conf.d/ would be (one for each host)
- >and in there you'd just have one stanza of:
- >I took a crack at the config file myself and didn't get that far. (I'm
- >not fantastic with
- >C) =).
- >pgpool-general mailing list
- >pgpool-general at pgpool.net
More information about the pgpool-general