On Dec 13, 11:27 pm, Daniel Pittman <[email protected]> wrote:
> > diff --git a/lib/puppet/network/resolver.rb b/lib/puppet/network/resolver.rb
> > new file mode 100644
> > index 0000000..9165efb
> > --- /dev/null
> > +++ b/lib/puppet/network/resolver.rb
> [...]
> > + Puppet.debug "Searching for SRV records for #{hostname}"
> > + rrs = resolver.getresources(hostname, Resolv::DNS::Resource::IN::SRV)
>
> Doesn't this resolve the label 'example.com', where you wanted
> '_puppet._tcp.example.com'?
>
I did not change the default for Puppet[:server] so if the configured
server does not have SRV records, it will just return the hostname
itself. I did this to keep compatibility and not change any
defaults. Ideally the default for Puppet[:server] would be
_puppet._tcp.$domain but until that's the case, you need to specify it
manually in the config file (or cmd line).
> > + # Find a list of priorities, try everything in the priority first
> > + # and then move to the next priority, would really like to have used
> > + # Array#group_by here, but puppet supports 1.8.1
> > + priorities = rrs.map { |record| record.priority }.sort.uniq
>
> I would probably have open-coded group_by here, but your work seems
> sound to me. I just think the rest of the algorithm would be much
> clearer (as, I think, do you) and justify the messing around with
> writing group_by. :)
Yeah, I agree it would be a lot cleaner, it's not really that hard to
do, I can work on that if it's a big enough deal.
-Andrew
>
> Regards,
> Daniel
> --
> ✣ Daniel Pittman ✉ [email protected] ☎ +61 401 155 707
> ♽ made with 100 percent post-consumer electrons
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" 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-dev?hl=en.