Project

General

Profile

Actions

Bug #1362

closed

smart-proxy fails to find configuration file.

Added by Telmo X almost 13 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Packaging
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

First of all I know I am doing this wrong, since I am installing the smart-proxy via a gem (which is incorrectly generated, but that's a topic for another discussion) but I believe the bug should affect any version no matter how is installed.

The issue is:

/opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/smart-proxy 
/opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/../lib/proxy/settings.rb:4:in `read': No such file or directory - /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/../config/settings.yml (Errno::ENOENT)
    from /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/../lib/proxy/settings.rb:4
    from /opt/comcast/platform/rubyee/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
    from /opt/comcast/platform/rubyee/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
    from /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/../lib/proxy.rb:5
    from /opt/comcast/platform/rubyee/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
    from /opt/comcast/platform/rubyee/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
    from /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/foreman_proxy-0.1/bin/smart-proxy:7

the culprit is :

https://github.com/ohadlevy/smart-proxy/blob/develop/lib/proxy/settings.rb

raw_config = File.read(Pathname.new(__FILE__).join("..", "..","..","config","settings.yml"))

unless I am missing it and is defined somewhere else in the code it wont try to look for the config file in /etc/foreman-proxy/ as stated in the documentation but in a config directory in the path of the executable

Actions #1

Updated by Ohad Levy almost 13 years ago

  • Status changed from New to Feedback

the package is responsible for creating the links between the config file and the /etc directory, we can't assume that someone who checks out from git has access or wants to use the etc directory

Actions #2

Updated by Ohad Levy almost 13 years ago

  • Target version deleted (1.0)
Actions #3

Updated by Anonymous over 7 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF