I appear that this will only work if the array is declared in the manifest. I''m attempting to make resolv.conf a template in which I can specify by node which array of name servers to use. which looks like this: $nameserver = [ "1.2.3.4", "1.2.3.5"] This works fine if it''s declared in the manifest, however if declare in the nodes.pp if merely concatenates the two name servers'' IPs together . Is there a different syntax to use in the nodes.pp file? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
no one has dealt with this before? On Nov 3, 4:39 pm, tek-ops <msche...@gmail.com> wrote:> I appear that this will only work if the array is declared in the > manifest. > > I''m attempting to make resolv.conf a template in which I can specify > by node which array of name servers to use. which looks like this: > $nameserver = [ "1.2.3.4", "1.2.3.5"] > > This works fine if it''s declared in the manifest, however if declare > in the nodes.pp if merely concatenates the two name servers'' IPs > together . Is there a different syntax to use in the nodes.pp file?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
search my.domain.tld <% nameserver.each do |n| %> nameserver <%= n %> <% end %> On 6/11/2008, at 7:52 AM, tek-ops <mschenck@gmail.com> wrote:> > no one has dealt with this before? > > On Nov 3, 4:39 pm, tek-ops <msche...@gmail.com> wrote: >> I appear that this will only work if the array is declared in the >> manifest. >> >> I''m attempting to make resolv.conf a template in which I can specify >> by node which array of name servers to use. which looks like this: >> $nameserver = [ "1.2.3.4", "1.2.3.5"] >> >> This works fine if it''s declared in the manifest, however if declare >> in the nodes.pp if merely concatenates the two name servers'' IPs >> together . Is there a different syntax to use in the nodes.pp file? > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
for me, that only works if I specify $nameserver in the manifest for my resolv.conf module. If I specify it in the node (i.e. configuring one node to use different name servers), it concatenates the two nameserver array elements to a single array. On Nov 5, 9:44 pm, Aj <a...@junglist.gen.nz> wrote:> search my.domain.tld > <% nameserver.each do |n| %> > nameserver <%= n %> > <% end %> > > On 6/11/2008, at 7:52 AM, tek-ops <msche...@gmail.com> wrote: > > > > > no one has dealt with this before? > > > On Nov 3, 4:39 pm, tek-ops <msche...@gmail.com> wrote: > >> I appear that this will only work if the array is declared in the > >> manifest. > > >> I''m attempting to make resolv.conf a template in which I can specify > >> by node which array of name servers to use. which looks like this: > >> $nameserver = [ "1.2.3.4", "1.2.3.5"] > > >> This works fine if it''s declared in the manifest, however if declare > >> in the nodes.pp if merely concatenates the two name servers'' IPs > >> together . Is there a different syntax to use in the nodes.pp file?--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Thu, Nov 06, 2008 at 07:36:51AM -0800, tek-ops wrote:> > for me, that only works if I specify $nameserver in the manifest for > my resolv.conf module. If I specify it in the node (i.e. configuring > one node to use different name servers), it concatenates the two > nameserver array elements to a single array.Please show a minimal example of what you do. -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
/etc/puppet/manifests/nodes.pp
--------------------------------------------------------------------------------
node "test1" {
$nameservers = ["192.168.0.2", "192.168.0.3"]
$domain = "nfs.example.com"
}
node "test2" {
$nameservers = ["10.0.0.2", "10.0.0.3"]
$domain = "prv.example.com"
}
--------------------------------------------------------------------------------
/etc/puppet/modules/resolv/templates/resolv.conf.erb
--------------------------------------------------------------------------------
search <%= domain %>
<% nameservers.each do |server| %>
nameserver <%= server %>
<% end %>
--------------------------------------------------------------------------------
Results for node "test1"
--------------------------------------------------------------------------------
search nfs.example.com
nameserver 192.168.0.2192.168.0.3
--------------------------------------------------------------------------------
Results for node "test2"
--------------------------------------------------------------------------------
search prv.example.com
nameserver 10.0.0.210.0.0.3
--------------------------------------------------------------------------------
So essentially, if the array is declared in the nodes themselves, then
the elements are concatenated. Which is more odd since if an array
is declared in /etc/puppet/modules/resolv/init.pp then is does work
(no concatenation).
Best Regards,
Michael Schenck
On Nov 7, 4:00 am, Marcin Owsiany <mar...@owsiany.pl>
wrote:> On Thu, Nov 06, 2008 at 07:36:51AM -0800, tek-ops wrote:
>
> > for me, that only works if I specify $nameserver in the manifest for
> > my resolv.conf module. If I specify it in the node (i.e. configuring
> > one node to use different name servers), it concatenates the two
> > nameserver array elements to a single array.
>
> Please show a minimal example of what you do.
>
> --
> Marcin Owsiany <mar...@owsiany.pl>
http://marcin.owsiany.pl/
> GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
>
> "Every program in development at MIT expands until it can read
mail."
> -- Unknown
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
I''ve actually submitted this as a bug (Bug #1738) http://projects.reductivelabs.com/issues/show/1738 As this seems like it was intended to work. On Nov 7, 10:18 am, tek-ops <msche...@gmail.com> wrote:> /etc/puppet/manifests/nodes.pp > -------------------------------------------------------------------------------- > node "test1" { > $nameservers = ["192.168.0.2", "192.168.0.3"] > $domain = "nfs.example.com" > > } > > node "test2" { > $nameservers = ["10.0.0.2", "10.0.0.3"] > $domain = "prv.example.com"} > > -------------------------------------------------------------------------------- > > /etc/puppet/modules/resolv/templates/resolv.conf.erb > -------------------------------------------------------------------------------- > search <%= domain %> > > <% nameservers.each do |server| %> > nameserver <%= server %> > <% end %> > -------------------------------------------------------------------------------- > > Results for node "test1" > -------------------------------------------------------------------------------- > search nfs.example.com > > nameserver 192.168.0.2192.168.0.3 > -------------------------------------------------------------------------------- > > Results for node "test2" > -------------------------------------------------------------------------------- > search prv.example.com > > nameserver 10.0.0.210.0.0.3 > -------------------------------------------------------------------------------- > > So essentially, if the array is declared in the nodes themselves, then > the elements are concatenated. Which is more odd since if an array > is declared in /etc/puppet/modules/resolv/init.pp then is does work > (no concatenation). > > Best Regards, > Michael Schenck > > On Nov 7, 4:00 am, Marcin Owsiany <mar...@owsiany.pl> wrote: > > > On Thu, Nov 06, 2008 at 07:36:51AM -0800, tek-ops wrote: > > > > for me, that only works if I specify $nameserver in the manifest for > > > my resolv.conf module. If I specify it in the node (i.e. configuring > > > one node to use different name servers), it concatenates the two > > > nameserver array elements to a single array. > > > Please show a minimal example of what you do. > > > -- > > Marcin Owsiany <mar...@owsiany.pl> http://marcin.owsiany.pl/ > > GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 > > > "Every program in development at MIT expands until it can read mail." > > -- Unknown--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I think I remember discovering that the translation from a variable into a template smashes the array together. Try passing it through a define and see what happens. I feel that this is a bug as well. Trevor On Fri, Nov 7, 2008 at 10:18, tek-ops <mschenck@gmail.com> wrote:> > /etc/puppet/manifests/nodes.pp > -------------------------------------------------------------------------------- > node "test1" { > $nameservers = ["192.168.0.2", "192.168.0.3"] > $domain = "nfs.example.com" > } > > node "test2" { > $nameservers = ["10.0.0.2", "10.0.0.3"] > $domain = "prv.example.com" > } > -------------------------------------------------------------------------------- > > /etc/puppet/modules/resolv/templates/resolv.conf.erb > -------------------------------------------------------------------------------- > search <%= domain %> > > <% nameservers.each do |server| %> > nameserver <%= server %> > <% end %> > -------------------------------------------------------------------------------- > > > Results for node "test1" > -------------------------------------------------------------------------------- > search nfs.example.com > > nameserver 192.168.0.2192.168.0.3 > -------------------------------------------------------------------------------- > > Results for node "test2" > -------------------------------------------------------------------------------- > search prv.example.com > > nameserver 10.0.0.210.0.0.3 > -------------------------------------------------------------------------------- > > > So essentially, if the array is declared in the nodes themselves, then > the elements are concatenated. Which is more odd since if an array > is declared in /etc/puppet/modules/resolv/init.pp then is does work > (no concatenation). > > Best Regards, > Michael Schenck > > > > > On Nov 7, 4:00 am, Marcin Owsiany <mar...@owsiany.pl> wrote: >> On Thu, Nov 06, 2008 at 07:36:51AM -0800, tek-ops wrote: >> >> > for me, that only works if I specify $nameserver in the manifest for >> > my resolv.conf module. If I specify it in the node (i.e. configuring >> > one node to use different name servers), it concatenates the two >> > nameserver array elements to a single array. >> >> Please show a minimal example of what you do. >> >> -- >> Marcin Owsiany <mar...@owsiany.pl> http://marcin.owsiany.pl/ >> GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 >> >> "Every program in development at MIT expands until it can read mail." >> -- Unknown > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Fri, Nov 07, 2008 at 07:18:11AM -0800, tek-ops wrote:> > /etc/puppet/manifests/nodes.pp > -------------------------------------------------------------------------------- > node "test1" { > $nameservers = ["192.168.0.2", "192.168.0.3"][...]> nameserver 192.168.0.2192.168.0.3 > --------------------------------------------------------------------------------[...]> So essentially, if the array is declared in the nodes themselves, then > the elements are concatenated. Which is more odd since if an array > is declared in /etc/puppet/modules/resolv/init.pp then is does work > (no concatenation).Hmm, I definitely used this kind of enumeration in the past and it worked correctly, although there were classes and defines involved. One thing I would suggest, is to rule out the possibility that you have an outdated file somewhere (try sticking another dummy nameserver into the array and see if it appears on the client). If you rule this out, then I definitely think this is a bug. -- Marcin Owsiany <marcin@owsiany.pl> http://marcin.owsiany.pl/ GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 "Every program in development at MIT expands until it can read mail." -- Unknown --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I just got it working, I had to restart puppetmaster, which seems like it shouldn''t have been necessary although I had just replaced a string with the array ... so I don''t know. On Nov 8, 7:13 am, Marcin Owsiany <mar...@owsiany.pl> wrote:> On Fri, Nov 07, 2008 at 07:18:11AM -0800, tek-ops wrote: > > > /etc/puppet/manifests/nodes.pp > > -------------------------------------------------------------------------------- > > node "test1" { > > $nameservers = ["192.168.0.2", "192.168.0.3"] > [...] > > nameserver 192.168.0.2192.168.0.3 > > -------------------------------------------------------------------------------- > [...] > > So essentially, if the array is declared in the nodes themselves, then > > the elements are concatenated. Which is more odd since if an array > > is declared in /etc/puppet/modules/resolv/init.pp then is does work > > (no concatenation). > > Hmm, I definitely used this kind of enumeration in the past and it > worked correctly, although there were classes and defines involved. > > One thing I would suggest, is to rule out the possibility that you have > an outdated file somewhere (try sticking another dummy nameserver into > the array and see if it appears on the client). > > If you rule this out, then I definitely think this is a bug. > > -- > Marcin Owsiany <mar...@owsiany.pl> http://marcin.owsiany.pl/ > GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 > > "Every program in development at MIT expands until it can read mail." > -- Unknown--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ve found that I have to restart the puppetmaster in various situations that I don''t think it should need. Generally, I restart it if: 1) I''ve mucked about with a bunch of variables 2) I''ve added custom facts or functions 3) I''ve made massive updates to modules It seems to all work out then. Trevor On Mon, Nov 10, 2008 at 09:50, tek-ops <mschenck@gmail.com> wrote:> > I just got it working, I had to restart puppetmaster, which seems like > it shouldn''t have been necessary although I had just replaced a string > with the array ... so I don''t know. > > On Nov 8, 7:13 am, Marcin Owsiany <mar...@owsiany.pl> wrote: >> On Fri, Nov 07, 2008 at 07:18:11AM -0800, tek-ops wrote: >> >> > /etc/puppet/manifests/nodes.pp >> > -------------------------------------------------------------------------------- >> > node "test1" { >> > $nameservers = ["192.168.0.2", "192.168.0.3"] >> [...] >> > nameserver 192.168.0.2192.168.0.3 >> > -------------------------------------------------------------------------------- >> [...] >> > So essentially, if the array is declared in the nodes themselves, then >> > the elements are concatenated. Which is more odd since if an array >> > is declared in /etc/puppet/modules/resolv/init.pp then is does work >> > (no concatenation). >> >> Hmm, I definitely used this kind of enumeration in the past and it >> worked correctly, although there were classes and defines involved. >> >> One thing I would suggest, is to rule out the possibility that you have >> an outdated file somewhere (try sticking another dummy nameserver into >> the array and see if it appears on the client). >> >> If you rule this out, then I definitely think this is a bug. >> >> -- >> Marcin Owsiany <mar...@owsiany.pl> http://marcin.owsiany.pl/ >> GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216 >> >> "Every program in development at MIT expands until it can read mail." >> -- Unknown > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Nov 10, 2008, at 10:43 AM, Trevor Vaughan wrote:> I''ve found that I have to restart the puppetmaster in various > situations that I don''t think it should need. > > Generally, I restart it if: > > 1) I''ve mucked about with a bunch of variables > 2) I''ve added custom facts or functions > 3) I''ve made massive updates to modules > > It seems to all work out then.Is this still the case in 0.24.5+? I thought we''d gotten all of these problems fixed. -- We are here on Earth to do good to others. What the others are here for, I don''t know. -- W. H. Auden --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Wed, Nov 12, 2008 at 4:28 PM, Luke Kanies <luke@madstop.com> wrote:> > On Nov 10, 2008, at 10:43 AM, Trevor Vaughan wrote: > >> I''ve found that I have to restart the puppetmaster in various >> situations that I don''t think it should need. >> >> Generally, I restart it if: >> >> 1) I''ve mucked about with a bunch of variables >> 2) I''ve added custom facts or functions >> 3) I''ve made massive updates to modules >> >> It seems to all work out then. > > > Is this still the case in 0.24.5+? I thought we''d gotten all of these > problems fixed.We''ve had zero problems since 0.24.5 + a couple of minor patches. Our monitoring scripts for puppet haven''t had to restart it at all, and we have a lot of refactoring going on at the moment actually. -- Nigel Kersten Systems Administrator Tech Lead - MacOps --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---