Bug #12786
closed
uninitialized constant Sinatra in smart_proxy_remote_execution_ssh
Added by Thomas McKay about 9 years ago.
Updated over 6 years ago.
Category:
Smart Proxy - SSH
|
Description
Dec 11 12:53:16 katello-katello systemd: Starting Foreman Proxy...
Dec 11 12:53:16 katello-katello smart-proxy: Performance on MRI may be improved\
with the concurrent-ruby-ext gem. Please see http://concurrent-ruby.com
Dec 11 12:53:16 katello-katello smart-proxy: /usr/share/gems/gems/smart_proxy_r\
emote_execution_ssh-0.0.8/lib/smart_proxy_remote_execution_ssh/api.rb:3:in `<mo\
dule:Ssh>': uninitialized constant Sinatra (NameError)
Dec 11 12:53:16 katello-katello smart-proxy: from /usr/share/gems/gems/smart_pr\
oxy_remote_execution_ssh-0.0.8/lib/smart_proxy_remote_execution_ssh/api.rb:2:in\
`<module:RemoteExecution>'
Dec 11 12:53:16 katello-katello smart-proxy: from /usr/share/gems/gems/smart_pr\
oxy_remote_execution_ssh-0.0.8/lib/smart_proxy_remote_execution_ssh/api.rb:1:in\
`<top (required)>'
Adding
require 'sinatra'
to smart_proxy_remote_execution_ssh/api.rb allowed foreman-proxy service to start.
After you added the explicit require, it started working? What is your setup? I have not seen this issue, so I'm wondering
if there might be something else causing this…
Ivan Necas wrote:
After you added the explicit require, it started working? What is your setup? I have not seen this issue, so I'm wondering
if there might be something else causing this…
I am running a katello-deploy dev setup on centos7. I don't know if anything is special or out of the ordinary.
I saw the same problem on a dev env (without katello) adding require did fix it for me.
Dmitri also commented out on the ML:
Shouldn’t need to require sinatra, as it is smart-proxy’s dependency
(https://github.com/theforeman/smart-proxy/blob/develop/smart_proxy.gemspec#L18).
Looking at smart_proxy_remote_execution_ssh I see that it requires all
its dependencies in smart_proxy_remote_execution_ssh.rb, which may
(and does) result in it attempting to reference Sinatra::Base before
it is available.
I would suggest moving all but
"smart_proxy_remote_execution_ssh/plugin” requires into Plugin class'
after_activation block.
- Status changed from New to Ready For Testing
- Assignee set to Daniel Lobato Garcia
- Target version set to 97
- Pull request https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/18 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Translation missing: en.field_release set to 115
- Translation missing: en.field_release changed from 115 to 118
Also available in: Atom
PDF