Project

General

Profile

Actions

Bug #12786

closed

uninitialized constant Sinatra in smart_proxy_remote_execution_ssh

Added by Thomas McKay over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Smart Proxy - SSH
Fixed in Releases:
Found in Releases:

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.

Actions #1

Updated by Ivan Necas over 8 years ago

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…

Actions #2

Updated by Thomas McKay over 8 years ago

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.

Actions #3

Updated by Ohad Levy over 8 years ago

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.

Actions #4

Updated by The Foreman Bot about 8 years ago

  • 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
Actions #5

Updated by Daniel Lobato Garcia about 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Marek Hulán about 8 years ago

  • translation missing: en.field_release set to 115
Actions #7

Updated by Marek Hulán about 8 years ago

  • translation missing: en.field_release changed from 115 to 118
Actions

Also available in: Atom PDF