I am noticing a ~10s slow down with 3.2.1-rc1 running 'puppet apply' with a manifest that is a single notice() function.
For that matter, the two previous sections that monkey-patch openssl
seem like they would be better off elsewhere; for example, the section
"if Puppet::Util::Platform.windows?" that starts on line 398 seems
like it might be better off somewhere in lib/puppet/util/windows*.
(Sorry to gripe w/o a patch; I haven't a Windows system to test on nor
do I know if I have a working setup for running the Puppet unit
tests.)
Wil
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To post to this group, send email to puppe...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
On Tue, May 21, 2013 at 9:53 AM, Charlie Sharpsteen
<ch...@puppetlabs.com> wrote:
> Could you provide a bit more information on what the entry in your /etc/hosts file looked like? It would be interesting to reproduce this behavior and see if everything is functioning as intended.
Sure; in my /etc/hosts I had the following for my host-only vbox net:
192.168.56.1 coolair.local coolair
With that in place:
$ time ruby -rsocket -e "Socket.gethostbyname(Socket.gethostname)"
real 0m10.013s
On Tue, May 21, 2013 at 9:53 AM, Charlie SharpsteenSure; in my /etc/hosts I had the following for my host-only vbox net:
<ch...@puppetlabs.com> wrote:
> Could you provide a bit more information on what the entry in your /etc/hosts file looked like? It would be interesting to reproduce this behavior and see if everything is functioning as intended.
192.168.56.1 coolair.local coolair
With that in place:
$ time ruby -rsocket -e "Socket.gethostbyname(Socket.gethostname)"
real 0m10.013s
And when I change it to:
192.168.56.1 coolair
I get:
$ time ruby -rsocket -e "Socket.gethostbyname(Socket.gethostname)"
real 0m0.032s
After a little tracing, it looks like it's the result of loading
webrick in puppet/util/monkey_patches.rb:
/Library/Ruby/Site/1.8/puppet/util/monkey_patches.rb:419::-: require 'webrick'
Which was added in ec462b7b: (#18781) Be more tolerant of old clients
in WEBrick server
Since this is just twiddling a constant (does that count as
monkey-patching?), wouldn't this maybe be better done in
lib/puppet/network/http/webrick.rb? If I understand it correctly,
these monkey-patches get applied for every invocation of puppet, even
if it's just "puppet --version", so it seems like it should be as
minimal as possible.
For that matter, the two previous sections that monkey-patch openssl
seem like they would be better off elsewhere; for example, the section
"if Puppet::Util::Platform.windows?" that starts on line 398 seems
like it might be better off somewhere in lib/puppet/util/windows*.
(Sorry to gripe w/o a patch; I haven't a Windows system to test on nor
do I know if I have a working setup for running the Puppet unit
tests.)
Wil
--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To post to this group, send email to puppe...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
On Tue, May 21, 2013 at 3:03 PM, Wil Cooley <wco...@nakedape.cc> wrote:
On Tue, May 21, 2013 at 9:53 AM, Charlie SharpsteenSure; in my /etc/hosts I had the following for my host-only vbox net:
<ch...@puppetlabs.com> wrote:
> Could you provide a bit more information on what the entry in your /etc/hosts file looked like? It would be interesting to reproduce this behavior and see if everything is functioning as intended.
192.168.56.1 coolair.local coolair
With that in place:
$ time ruby -rsocket -e "Socket.gethostbyname(Socket.gethostname)"
real 0m10.013s
And when I change it to:
192.168.56.1 coolair
I get:
$ time ruby -rsocket -e "Socket.gethostbyname(Socket.gethostname)"
real 0m0.032s
After a little tracing, it looks like it's the result of loading
webrick in puppet/util/monkey_patches.rb:
/Library/Ruby/Site/1.8/puppet/util/monkey_patches.rb:419::-: require 'webrick'
Which was added in ec462b7b: (#18781) Be more tolerant of old clients
in WEBrick serverThanks for tracking it down to that. Charlie and I traced it a bit further and found that inside webrick it loads webrick/config.rb which sets up a hash that contains the servername that is determined by calling WEBrick::Util.getservername which does these reverse lookups. That explains the mystery of simply loading some code causing a DNS lookup to occur.Looking at that patch, I'm not certain if we should simply revert it or move that to another place in the code. My current thinking is that we should simply revert it because it is only needed to support 2.6 and earlier clients, which Puppet 3 does not support anyway (the policy is that a master only supports one "major" version back for agents, and in the case of 2.6 and 2.7 that means only 2.7 is supported, not 2.6).