-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple dnsmasq::dnsserver statements end up being re-ordered all of the time #52
Comments
Honestly never tried it this way (and i hasn't used this module for a long time now). what happens if you just specify multiple dnsmasq::dnsserver classes? |
I'd guess the same. order = 12 for the concat fragment would make them end up the same way in a non-ordered hash. I'd have to test - but maybe writing a test-case for this module might be more useful. I can't really get around having this configurable / using create_resources in our setup. |
the one with first name (by alphabet) will run first, at least it was working before. dnsmasq::dnsserver { '1-server':
ip => '1.1.1.1'
} dnsmasq::dnsserver { '2-server':
ip => '2.2.2.2'
} And 1-server should be first. Again, it was that way. Maybe something has changed in concat/puppet. |
Are you sure this holds for Ruby < 1.9? |
I'm tempted to solve this by dropping files in /etc/dnsmasq.d/server-${name}.conf with the same template. |
Should be irrelevant to ruby version. This module was written back in the day when puppet 2.7 was "newest release" and 1.8.7 was default package in debian. |
Ruby >= 1.9 has ordered hashes while Ruby 1.8.7 hasn't. We're always suffering from that here ;) |
well then, strange that it worked before. But right now i can't help - i do not have puppet box near me and i can't test it. |
I just noticed I'm using the Puppetforge version, which is quite different to the current one on github ... |
checked master version yet? |
nope, just abandoned using the module altogether - I can only use Puppetforge modules here right now, and just reimplemented what I need myself. |
ah, ok then. Module on puppetforge is "stable" and i can't test new version right now due to absence of test env, sadly. |
Tested with Puppet 3.7.3 on Ruby 1.8.7 on CentOS 6.7 with a minimal wrapper recipe:
when $dnsservers = { "ns1" => "1.2.3.4", "ns2" => "4.3.2.1" }, /etc/dnsmasq.conf oscillates between
and
... with dnsmasq restarts on almost every Puppet run.
(the weird dependency issue and adding --all-servers are out of scope for this moderately urgent issue)
My usecase is caching multiple high(er) latency upstream forwarders.
Do you have any advice?
The text was updated successfully, but these errors were encountered: