You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am behind proxy. I have set proxy setting in sensu class gem_install_options => [{ '--http-proxy' => 'http://1.1.1.1:2222' }]
all puppet runs takes very long time Notice: Finished catalog run in 155.74 seconds
it looks like it does not pass install_options to the package correctly
as it stuck at /usr/bin/gem list --remote ^sensu-plugin$ until it time outs
manual run:
time /usr/bin/gem list --remote ^sensu-plugin$ --debug -V
Exception `NameError' at /usr/lib/ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::ListCommand
*** REMOTE GEMS ***
Exception `Errno::ETIMEDOUT' at /usr/lib/ruby/1.9.1/net/http.rb:762 - Connection timed out - connect(2)
Exception `Gem::RemoteFetcher::FetchError' at /usr/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:246 - Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz)
sensu-plugin (1.2.0)
real 2m7.807s
user 0m0.504s
sys 0m0.056s
time /usr/bin/gem list --remote ^sensu-plugin$ --http-proxy http://1.1.1.1:2222
*** REMOTE GEMS ***
sensu-plugin (1.2.0)
real 0m1.547s
user 0m0.467s
sys 0m0.071s
Setting global proxy settings kinda "solves" the problem but I need it to be managed through module itself.
And as far as I can tell, there's no ability to pass options to gem list:
def self.gemlist(options)
gem_list_command = [command(:gemcmd), "list"]
if options[:local]
gem_list_command << "--local"
else
gem_list_command << "--remote"
end
if options[:source]
gem_list_command << "--source" << options[:source]
end
if name = options[:justme]
gem_list_command << "^" + name + "$"
end
begin
list = execute(gem_list_command).lines.
map {|set| gemsplit(set) }.
reject {|x| x.nil? }
rescue Puppet::ExecutionFailure => detail
raise Puppet::Error, "Could not list gems: #{detail}", detail.backtrace
end
Adding this as part of the module seems out of scope for this particularly provider - I expect you'll have the same issues with the standard puppet provider as well? I'm going to close this, as I think it's a problem with the original puppet provider, not with the sensu gem one.
Hi,
I am behind proxy. I have set proxy setting in
sensuclassgem_install_options => [{ '--http-proxy' => 'http://1.1.1.1:2222' }]all puppet runs takes very long time
Notice: Finished catalog run in 155.74 secondsit looks like it does not pass install_options to the package correctly
as it stuck at
/usr/bin/gem list --remote ^sensu-plugin$until it time outsmanual run:
Setting global proxy settings kinda "solves" the problem but I need it to be managed through module itself.
Karolis
The text was updated successfully, but these errors were encountered: