Bug 830684 - deltacloud fails to start on Fedora 17
Summary: deltacloud fails to start on Fedora 17
Keywords:
Status: CLOSED EOL
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: deltacloud-core
Version: 1.1.0
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: rc
Assignee: Michal Fojtik
QA Contact: Rehana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 08:23 UTC by Imre Farkas
Modified: 2020-03-27 19:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:38:09 UTC
Embargoed:


Attachments (Terms of Use)
deltacloud daemon service (198 bytes, application/octet-stream)
2012-06-13 10:52 UTC, Imre Farkas
no flags Details

Description Imre Farkas 2012-06-11 08:23:25 UTC
Description of problem:
Got the following exception in /var/log/deltacloud-core
>> Writing PID to /var/run/deltacloud-core-mock.pid
>> Changing process privilege to nobody:nobody
>> Exiting!
/usr/share/gems/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `delete': Permission denied - /var/run/deltacloud-core-mock.pid (Errno::EACCES)
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/daemonizing.rb:158:in `remove_pid_file'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/daemonizing.rb:59:in `block in daemonize'
/usr/share/deltacloud-core/lib/deltacloud/drivers/mock/mock_driver.rb:97:in `initialize': Please set either the DELTACLOUD_MOCK_STORAGE or USER environment variable (RuntimeError)
	from /usr/share/deltacloud-core/lib/deltacloud/drivers.rb:69:in `new'
	from /usr/share/deltacloud-core/lib/deltacloud/drivers.rb:69:in `driver'
	from /usr/share/deltacloud-core/lib/deltacloud/server.rb:59:in `block in <top (required)>'
	from /usr/share/gems/gems/sinatra-1.3.2/lib/sinatra/base.rb:1273:in `configure'
	from /usr/share/gems/gems/sinatra-1.3.2/lib/sinatra/base.rb:1602:in `block (2 levels) in delegate'
	from /usr/share/deltacloud-core/lib/deltacloud/server.rb:48:in `<top (required)>'
	from /usr/share/deltacloud-core/bin/../config.ru:25:in `load'
	from /usr/share/deltacloud-core/bin/../config.ru:25:in `block in <main>'
	from /usr/share/gems/gems/rack-1.4.0/lib/rack/builder.rb:51:in `instance_eval'
	from /usr/share/gems/gems/rack-1.4.0/lib/rack/builder.rb:51:in `initialize'
	from /usr/share/deltacloud-core/bin/../config.ru:1:in `new'
	from /usr/share/deltacloud-core/bin/../config.ru:1:in `<main>'
	from /usr/share/gems/gems/thin-1.3.1/lib/rack/adapter/loader.rb:36:in `eval'
	from /usr/share/gems/gems/thin-1.3.1/lib/rack/adapter/loader.rb:36:in `load'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/controllers/controller.rb:181:in `load_rackup_config'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/controllers/controller.rb:71:in `start'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
	from /usr/share/deltacloud-core/bin/deltacloudd:235:in `<top (required)>'
	from /usr/bin/deltacloudd:5:in `load'
	from /usr/bin/deltacloudd:5:in `<main>'


Version-Release number of selected component (if applicable):
# rpm -qa | grep deltacloud
deltacloud-core-0.5.0-3.fc17.rc1.noarch
rubygem-deltacloud-client-0.5.0-1.fc17.noarch
deltacloud-core-ec2-0.5.0-3.fc17.rc1.noarch
deltacloud-core-vsphere-0.5.0-3.fc17.rc1.noarch
deltacloud-core-rhevm-0.5.0-3.fc17.rc1.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Michal Fojtik 2012-06-11 08:36:28 UTC
I can confirm this issue. I get another one but seems very related:

>> Changing process privilege to nobody:nobody
>> Exiting!
/usr/share/gems/gems/thin-1.3.1/lib/thin/daemonizing.rb:69:in `getpwnam': can't find user for nobody (ArgumentError)
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/daemonizing.rb:69:in `change_privilege'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/controllers/controller.rb:66:in `start'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command'
	from /usr/share/gems/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!'
	from /usr/share/deltacloud-core/bin/deltacloudd:235:in `<top (required)>'
	from /usr/bin/deltacloudd:5:in `load'

My suspicion is the 'Etc' extension in Ruby that reads data from /etc/passwd and from the ENV variable. Since 'system.d' drops the ENV hash it can't read the data properly.
To fix this issue we have 3 options:

1. Fix Ruby to read the ENV variable from different source
2. Fix thin to get the user ID using a different way
3. Do user-switching using system.d capabilities.

Comment 2 Michal Fojtik 2012-06-13 09:56:41 UTC
OK so the issue seems to be related to SELinux. Disabling SELinux should help to get rid of the error message above. However a change to the init script needed. Imre do you have the service file that works for you? Can you attach it to the bug?

Comment 3 Imre Farkas 2012-06-13 10:52:23 UTC
Created attachment 591437 [details]
deltacloud daemon service

created by eck

Comment 4 Michal Fojtik 2012-06-26 12:37:42 UTC
================================================================================
    deltacloud-core-1.0.0-1.fc17
================================================================================
   Release: Fedora 17
    Status: pending
      Type: enhancement
     Karma: 0
   Request: testing
     Notes: Deltacloud API 1.0 release
 Submitter: mfojtik
 Submitted: 2012-06-26 08:49:52

 https://admin.fedoraproject.org/updates/deltacloud-core-1.0.0-1.fc17

This version should fix this problem.

Comment 5 Ronelle Landy 2012-06-27 14:46:51 UTC
Installed deltacloud-core-1.0.0-4.fc17 and tested the service start/stop/restart. 
See test comments from https://bugzilla.redhat.com/show_bug.cgi?id=747639

Checking aeolus services ....

aeolus-restart-services

Stoping ntpd ...
Redirecting to /bin/systemctl  stop ntpd.service
 Success: 

Stoping imagefactory ...
 Success: Stopping imagefactory (via systemctl):           [  OK  ]

Stoping conductor-dbomatic ...
 Success: Stopping conductor-dbomatic (via systemctl):     [  OK  ]

Stoping aeolus-conductor ...
 Success: Stopping aeolus-conductor (via systemctl):       [  OK  ]

Stoping libvirtd ...
 Success: Stopping libvirtd (via systemctl):               [  OK  ]

Stoping deltacloud-core ...
Redirecting to /bin/systemctl  stop deltacloud-core.service
 Success: 

Stoping httpd ...
Redirecting to /bin/systemctl  stop httpd.service
 Success: 

Stoping postgresql ...
Redirecting to /bin/systemctl  stop postgresql.service
 Success: 

Stoping iwhd ...
 Success: Stopping iwhd (via systemctl):                   [  OK  ]

Stoping mongod ...
Redirecting to /bin/systemctl  stop mongod.service
 Success: 

Starting mongod ...
Redirecting to /bin/systemctl  start mongod.service
 Success: 

Starting iwhd ...
 Success: Starting iwhd (via systemctl):                   [  OK  ]

Starting postgresql ...
Redirecting to /bin/systemctl  start postgresql.service
 Success: 

Starting httpd ...
Redirecting to /bin/systemctl  start httpd.service
 Success: 

Starting deltacloud-core ...
Redirecting to /bin/systemctl  start deltacloud-core.service
 Success: 

Starting libvirtd ...
 Success: Starting libvirtd (via systemctl):               [  OK  ]

Starting aeolus-conductor ...
 Success: Starting aeolus-conductor (via systemctl):       [  OK  ]

Starting conductor-dbomatic ...
 Success: Starting conductor-dbomatic (via systemctl):     [  OK  ]

Starting imagefactory ...
 Success: Starting imagefactory (via systemctl):           [  OK  ]

Starting ntpd ...
Redirecting to /bin/systemctl  start ntpd.service
 Success: 

Statusing mongod ...
Redirecting to /bin/systemctl  status mongod.service
 Success: mongod.service - High-performance, schema-free document-oriented database
	  Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled)
	  Active: active (running) since Tue, 26 Jun 2012 19:11:47 -0400; 15s ago
	 Process: 23708 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=0/SUCCESS)
	Main PID: 23711 (mongod)
	  CGroup: name=systemd:/system/mongod.service
		  └ 23711 /usr/bin/mongod --quiet -f /etc/mongodb.conf run
[root@qeblade39 log]# cd deltacloud-core
[root@qeblade39 deltacloud-core]# ls
[root@qeblade39 deltacloud-core]# 

ie; mock.log is empty now

rpm -qa |grep deltacloud
deltacloud-core-rackspace-1.0.0-3.fc17.noarch
deltacloud-core-rimuhosting-1.0.0-3.fc17.noarch
deltacloud-core-gogrid-1.0.0-3.fc17.noarch
deltacloud-core-1.0.0-3.fc17.noarch
deltacloud-core-openstack-1.0.0-3.fc17.noarch
deltacloud-core-sbc-1.0.0-3.fc17.noarch
deltacloud-core-rhevm-1.0.0-3.fc17.noarch
deltacloud-core-google-1.0.0-3.fc17.noarch
deltacloud-core-fgcp-1.0.0-3.fc17.noarch
deltacloud-core-ec2-1.0.0-3.fc17.noarch
deltacloud-core-all-1.0.0-3.fc17.noarch
rubygem-deltacloud-client-0.5.0-3.fc17.noarch
deltacloud-core-doc-1.0.0-3.fc17.noarch
deltacloud-core-vsphere-1.0.0-3.fc17.noarch
deltacloud-core-opennebula-1.0.0-3.fc17.noarch
deltacloud-core-eucalyptus-1.0.0-3.fc17.noarch


rpm -qa |grep aeolus
aeolus-conductor-doc-0.10.2-1.fc17.noarch
rubygem-aeolus-cli-0.5.0-1.fc17.noarch
aeolus-conductor-0.10.2-1.fc17.noarch
aeolus-conductor-daemons-0.10.2-1.fc17.noarch
aeolus-configure-2.6.0-1.fc17.noarch
rubygem-aeolus-image-0.5.0-1.fc17.noarch
aeolus-all-0.10.2-1.fc17.noarch


Note You need to log in before you can comment on or make changes to this bug.