Project

General

Profile

Actions

Bug #16111

closed

Smart proxy init script won't start due to CWD

Added by Trey Dockendorf almost 8 years ago. Updated about 7 years ago.

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

Description

The CWD of the process that starts the foreman-proxy service is effecting the service's ability to start. If I start foreman-proxy, as root, from /root, the service fails. If I cd to /tmp, the service starts. This is also causing logrotate to crash foreman-proxy when it's restarted. I have 4 systems running smart-proxy and so far only 1 of the 4 has the logrotate issue but all 4 fail to start foreman-proxy unless I cd to /tmp.

Example:

[root@HOST ~]# pwd
/root
[root@HOST ~]# /etc/init.d/foreman-proxy restart
Stopping foreman-proxy: [ OK ]
Starting foreman-proxy: /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in `chdir': Permission denied - /root (Errno::EACCES)
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in `chdir'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler.rb:342:in `load_gemspec_uncached'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler.rb:332:in `load_gemspec'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler/dsl.rb:51:in `gemspec'
from /usr/share/foreman-proxy/Gemfile.in:3:in `eval_gemfile'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.5.2/lib/bundler/dsl.rb:9:in `evaluate'
from /usr/lib/ruby/gems/1.8/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:14:in `parse_from_gemfile'
from /usr/lib/ruby/gems/1.8/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in `system_require'
from /usr/share/foreman-proxy/lib/bundler_helper.rb:22:in `require_groups'
from /usr/share/foreman-proxy/lib/smart_proxy_main.rb:32
from /usr/share/foreman-proxy/bin/smart-proxy:5:in `require'
from /usr/share/foreman-proxy/bin/smart-proxy:5
[FAILED]
[root@HOST ~]# cd /tmp
[root@HOST tmp]# pwd
/tmp
[root@HOST tmp]# /etc/init.d/foreman-proxy restart
Stopping foreman-proxy: foreman-proxy was not running. [FAILED]
Starting foreman-proxy: [ OK ]

Actions

Also available in: Atom PDF