Bug #16760
closedCannot load concurrent ruby in smart proxy puppet V3 API
Added by Stephen Benjamin about 8 years ago. Updated over 6 years ago.
Description
E, [2016-09-30T16:15:22.213297 #2456] ERROR -- : Disabling all modules in the group ['puppet_proxy_puppet_api', 'puppet'] due to a failure in one of them: Gem loading error: cannot load such file -- concurrent/ruby
Updated by Anonymous about 8 years ago
- Status changed from New to Feedback
I think you have an older version or multiple versions of concurrent-ruby gem installed. Could you try removing them and reinstalling smart-proxy?
Updated by Stephen Benjamin about 8 years ago
Dmitri Dolguikh wrote:
I think you have an older version or multiple versions of concurrent-ruby gem installed. Could you try removing them and reinstalling smart-proxy?
I do not, this is fully reproducible on an up-to-date CentOS 7.2 box with a fresh install from foreman nightlies. I tried twice.
[root@centos7-foreman-provision-nightly foreman-proxy]# rpm -qa | grep concurrent rubygem-concurrent-ruby-1.0.0-2.fm1_11.el7.noarch sclo-ror42-rubygem-concurrent-ruby-1.0.0-2.el7.noarch
There is something odd going on in bundler, here's the full traceback from proxy.log:
E, [2016-09-30T17:33:04.884956 #4216] ERROR -- : Disabling all modules in the group ['puppet_proxy_puppet_api', 'puppet'] due to a failure in one of them: Gem loading error: cannot load such file -- concurrent/ruby D, [2016-09-30T17:33:04.884990 #4216] DEBUG -- : ["/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/output.rb:13:in `strict_err'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:52:in `rescue in rescue in block in system_require'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:43:in `rescue in block in system_require'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:39:in `block in system_require'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'", "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'", "/usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:242:in `load_settings'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:81:in `block in load_provider_settings'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:80:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:80:in `load_provider_settings'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:155:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:155:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:155:in `initialize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:134:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]
I dug a little in Pry, and I don't know if this is relevant but, if I intercept "/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:
require 'pry-remote'; binding.remote_pry if name == 'concurrent-ruby'
And look at the files it's trying to require:
From: /usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb @ line 15 BundlerExt.system_require: 11: def self.system_require(gemfile, *groups) 12: runtime.setup_env 13: 14: Gemfile.parse(gemfile, *groups).each do |name, gem_dep| => 15: require 'pry-remote'; binding.remote_pry if name == 'concurrent-ruby' 16: if System.activate? 17: System.activate!(name) 18: end 19: 20: runtime.system_require(gem_dep[:files]) 21: end 22: end [1] pry(BundlerExt)> gem_dep History not saved; unable to open your history file for writing. => {:dep=> Gem::Dependency.new("concurrent-ruby", Gem::Requirement.new(["~> 1.0"]), :runtime), :files=>["concurrent-ruby"]}
It's requiring a file called concurrent-ruby, but I think it should just be concurrent? If I modify it:
[2] pry(BundlerExt)> gem_dep[:files] = ['concurrent'] => ["concurrent"]
The proxy starts fine and puppet API loads.
Updated by Dominic Cleal about 8 years ago
- Status changed from Feedback to Assigned
- Assignee set to Dominic Cleal
- Translation missing: en.field_release set to 189
Bundler's ignoring the load error when Bundler.require(:puppet_proxy_puppet_api)
is called, while BundlerExt raises it. Bundler's working because v3_environment_classes_api_classes_retriever.rb requires concurrent when called from load_classes.
Updated by Dominic Cleal about 8 years ago
- Related to Feature #15095: Add Puppet server environment_classes API support added
Updated by The Foreman Bot about 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/462 added
Updated by Dominic Cleal about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 9a78ebd77c51ed5021ca2f3aed8b55776e7ec2a0.