This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1021405 - Nova Scheduler service failed to start due to missing hard dependency [NEEDINFO]
Nova Scheduler service failed to start due to missing hard dependency
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
Unspecified Linux
unspecified Severity high
: beta
: 4.0
Assigned To: Xavier Queralt
Pavel Sedlák
: OtherQA
: 1021226 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-10-21 05:03 EDT by Nir Magnezi
Modified: 2013-12-19 19:30 EST (History)
10 users (show)

See Also:
Fixed In Version: openstack-nova-2013.2-5.el6ost
Doc Type: Bug Fix
Doc Text:
The openstack-nova-scheduler component requires modules provided by the python-cinderclient package. However, the Nova Scheduler's package was not dependent on python-cinderclient. As a result, users could unknowingly deploy a openstack-nova-scheduler service that could not start. This fix adds the required dependency, ensuring that users install all the modules required by the openstack-nova-scheduler service.
Story Points: ---
Clone Of:
Last Closed: 2013-12-19 19:30:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
slong: needinfo? (psedlak)

Attachments (Terms of Use)
nova scheduler log (5.00 KB, text/plain)
2013-10-21 05:04 EDT, Nir Magnezi
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1246103 None None None Never
OpenStack gerrit 54512 None None None Never

  None (edit)
Description Nir Magnezi 2013-10-21 05:03:35 EDT
Description of problem:
I installed nova scheduler service as a standalone node (Via packstack).
It fails to start with a missing import:

ImportError: No module named cinderclient

Version-Release number of selected component (if applicable):
puddle: 2013-10-15.1


How reproducible:

Steps to Reproduce:
1. Install OpenStack via packstack, Make sure that the node you configure to run nova scheduler service is only used with CONFIG_NOVA_SCHED_HOST.

2. Via CLI, check nova-scheduler service status:
   # service openstack-nova-scheduler status

3. Check nova-scheduler log

Actual results:
nova-scheduler status:
openstack-nova-scheduler dead but pid file exists

nova-scheduler log:
ImportError: No module named cinderclient

Expected results:
nova-scheduler should be up and running post installation.

Additional Info:
To work around the issue:
1. install python-cinderclient
   # yum install python-cinderclient

2. and restarted the nova-scheduler service.
   # service openstack-nova-scheduler restart
Comment 1 Nir Magnezi 2013-10-21 05:04:16 EDT
Created attachment 814476 [details]
nova scheduler log
Comment 3 Solly Ross 2013-10-29 17:54:35 EDT
Review submitted upstream:
Comment 4 Xavier Queralt 2013-10-30 05:27:59 EDT
(In reply to Solly Ross from comment #3)
> Review submitted upstream:

If scheduler or cert (See bug 1021226 which is caused by the same problem) services require cinderclient, it should be fixed in the RPM instead of the puppet modules. Think about somebody deploying without puppet or updating an existing system.

Having said that I think that neither cert nor scheduler should depend on cinderclient and looking at the attached traceback one can see that this dependency is easy to avoid by preventing nova.volume.encryptors instantiating the volume API in the module scope.
Comment 5 Nikola Dipanov 2013-10-30 06:12:21 EDT
As Xavier suggests - the best way would be to avoid this dependency by removing the explicit import of nova.volume from the encryptors module, and instead passing the API class as a parameter to the functions in that module.

This patch is not risky for upstream master not as a backport, but we will likely have to carry it since I am not sure how likely it is to get accepted for upstream stable.
Comment 6 Xavier Queralt 2013-10-30 06:26:48 EDT
*** Bug 1021226 has been marked as a duplicate of this bug. ***
Comment 8 Scott Lewis 2013-11-19 11:54:24 EST
Auto adding >= MODIFIED bugs to beta
Comment 10 Pavel Sedlák 2013-12-13 09:15:29 EST
Verified - nova-scheduler does not dies without cinderclient anymore:
Old version 2013.2-0.25.rc1, new version 2013.2-5.el6ost.

> # rpm -qa|grep scheduler
> openstack-nova-scheduler-2013.2-0.25.rc1.el6ost.noarch
> # service openstack-nova-scheduler status
> openstack-nova-scheduler (pid  14458) is running...
> # grep Import /var/log/nova/scheduler.log
> #yum remove python-cinderclient
> ...
> Removed:
>   python-cinderclient.noarch 0:1.0.6-1.el6ost
> Dependency Removed:
>   openstack-cinder.noarch 0:2013.2-0.11.rc1.el6ost
>   openstack-dashboard.noarch 0:2013.2-0.15.rc2.el6ost
>   openstack-dashboard-theme.noarch 0:2013.2-0.15.rc2.el6ost
>   openstack-glance.noarch 0:2013.2-0.12.rc1.el6ost
>   openstack-nova-compute.noarch 0:2013.2-0.25.rc1.el6ost
>   python-glance.noarch 0:2013.2-0.12.rc1.el6ost
>   redhat-access-plugin-openstack.noarch 0:1.2.0-5.el6ost
> # /etc/init.d/openstack-nova-scheduler restart
> Stopping openstack-nova-scheduler:                         [  OK  ]
> Starting openstack-nova-scheduler:                         [  OK  ]
> # service openstack-nova-scheduler status
> openstack-nova-scheduler dead but pid file exists
> # grep Import /var/log/nova/scheduler.log
> 2013-12-13 14:05:14.093 23274 TRACE nova ImportError: No module named cinderclient
> #

> # rpm -qa|grep scheduler
> openstack-nova-scheduler-2013.2-5.el6ost.noarch
> # service openstack-nova-scheduler status
> openstack-nova-scheduler (pid  14514) is running...
> # grep Import /var/log/nova/scheduler.log
> # yum remove python-cinderclient
> ...
> Removed:
>   python-cinderclient.noarch 0:1.0.7-1.el6ost
> Dependency Removed:
>   openstack-cinder.noarch 0:2013.2-3.el6ost
>  openstack-dashboard.noarch 0:2013.2-5.el6ost
>  openstack-dashboard-theme.noarch 0:2013.2-5.el6ost
>  openstack-glance.noarch 0:2013.2-3.el6ost
>  openstack-nova-compute.noarch 0:2013.2-5.el6ost
>  python-glance.noarch 0:2013.2-3.el6ost
>  redhat-access-plugin-openstack.noarch 0:4.0.0-0.el6ost
> # /etc/init.d/openstack-nova-scheduler restart
> Stopping openstack-nova-scheduler:                         [  OK  ]
> Starting openstack-nova-scheduler:                         [  OK  ]
> # service openstack-nova-scheduler status
> openstack-nova-scheduler (pid  15866) is running...
> # grep Import /var/log/nova/scheduler.log
> #
Comment 12 Summer Long 2013-12-16 16:28:14 EST
Pavel, you wrote on rhos-docs: 
"[21:09] <psedlak> hi, i have issue with Doc Text of
[21:09] <psedlak> it was actually fixed in the other way than what is written in there ..."
Yaniv Eylon wrote the doc text; you might also let him know. Could you please correct the text and reset the 'requires_doc_text' flag to? This just ensures the edit.
Comment 14 errata-xmlrpc 2013-12-19 19:30:06 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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