Project

General

Profile

Bug #8367

After upgrade of Foreman from 1.5 to 1.6.1 it fails to communicate with proxy in threaded mode, throwing weird error : uninitialized constant ProxyAPI::Features

Added by Andrii Guselietov over 7 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Background info :
HOSTNAME: tkpuppetmaster.*.*
OS: redhat
RELEASE: Scientific Linux release 6.5 (Carbon)
FOREMAN: 1.6.1
RUBY: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
PUPPET: 3.7.3
DENIALS: 0

So, normal Ruby, decent operation system, decent Puppet, nothing special except for enabled Memcached plugin, but I think it is out of scope here.
Foreman running under Apache2-Passenger.

After upgrading of all Foreman packages to version 1.6.1 (including proxy) Foreman stops communicating with proxy.

E.g.
1) proxy is up and running
2) proxy listening to port,
3) Proxy temporary switched to HTTP no-SSL mode, to avoid possible SSL problems
4) I can ask proxy features with curl :
curl -k -H "Accept: application/json" http://localhost:8443/features
["facts","puppet","puppetca"]
5) I can ask puppet environments with curl also :
curl http://127.0.0.1:8443/puppet/environments
["development","production"]

-> localhost and 127.0.0.1 used by purpose - the same reply will be on a normal FQDN, for internal domain, So DNS is OK
6) then - I am going yo smart_proxies page of a Foreman, filling in proxy-data as : http://127.0.0.1:8443 , pressing Sumbit - and see green message in WebUI
and such messages in Foreman log :

Started PUT "/smart_proxies/1-foreman" for 192.168.*.* at 2014-11-12 14:38:02 +0100
Processing by SmartProxiesController#update as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"VaMnt1zQd15rLl7587RAWJ0C37Pkxdn+rRH+3FxEKO8=", "smart_proxy"=>{"name"=>"Foreman", "url"=>"http://127.0.0.1:8443"}, "commit"=>"Submit", "id"=>"1-foreman"}
Redirected to https://tkpuppetmaster.*.*/smart_proxies
Completed 302 Found in 123ms (ActiveRecord: 48.9ms)

7) Next step - I am trying to get proxy features - choosing appropriate subitem from Drop-down box, and receiving error message ( both in WebUI and )
log :
Started PUT "/smart_proxies/1-foreman/refresh" for 192.168.*.* at 2014-11-12 14:40:17 +0100
Processing by SmartProxiesController#refresh as HTML
Parameters: {"authenticity_token"=>"VaMnt1zQd15rLl7587RAWJ0C37Pkxdn+rRH+3FxEKO8=", "id"=>"1-foreman"}
Failed to save: Unable to communicate with the proxy: uninitialized constant ProxyAPI::Features, Please check the proxy is configured and running on the host.
Redirected to https://tkpuppetmaster.*.*/smart_proxies
Completed 302 Found in 35ms (ActiveRecord: 22.6ms)

7.A) - the funny part here - that - I have a tcpdump running in another windows - actually capturing all traffic to 8443 ports, and that's why I switched off SSL, to look at messages. And guess what ? Foreman even did not tried to contact proxy.

And all this looks like bug to me, and only happening in threaded mode , e.g. when I have in production.rb setting :
config.threadsafe!

I also uploaded file as suggested by Your Wiki-page via rsync : /tmp/foreman-debug-i7rfw.tar.xz

Associated revisions

Revision 2ea1b529 (diff)
Added by Shlomi Zadok over 7 years ago

fixes #8367 - Eager load classes under /lib

History

#1 Updated by Dominic Cleal over 7 years ago

  • Category set to Rails

#2 Updated by Shlomi Zadok over 7 years ago

  • Assignee set to Shlomi Zadok

#3 Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1961 added
  • Pull request deleted ()

#4 Updated by Dominic Cleal over 7 years ago

  • Legacy Backlogs Release (now unused) set to 28

#5 Updated by Shlomi Zadok over 7 years ago

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

Also available in: Atom PDF