Bug 1021405 - Nova Scheduler service failed to start due to missing hard dependency
Summary: Nova Scheduler service failed to start due to missing hard dependency
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 4.0
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: beta
: 4.0
Assignee: Xavier Queralt
QA Contact: Pavel Sedlák
URL:
Whiteboard:
: 1021226 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-21 09:03 UTC by Nir Magnezi
Modified: 2023-09-14 01:52 UTC (History)
9 users (show)

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.
Clone Of:
Environment:
Last Closed: 2013-12-20 00:30:06 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1246103 0 None None None Never
OpenStack gerrit 54512 0 None MERGED Pass volume_api to get_encryption_metadata 2020-11-20 08:32:52 UTC
Red Hat Product Errata RHEA-2013:1859 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2013-12-21 00:01:48 UTC

Description Nir Magnezi 2013-10-21 09:03:35 UTC
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

openstack-nova-common-2013.2-0.25.rc1.el6ost.noarch
openstack-nova-scheduler-2013.2-0.25.rc1.el6ost.noarc

How reproducible:
=================
Always

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 09:04:16 UTC
Created attachment 814476 [details]
nova scheduler log

Comment 3 Solly Ross 2013-10-29 21:54:35 UTC
Review submitted upstream: https://review.openstack.org/#/c/54437/

Comment 4 Xavier Queralt 2013-10-30 09:27:59 UTC
(In reply to Solly Ross from comment #3)
> Review submitted upstream: https://review.openstack.org/#/c/54437/

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 10:12:21 UTC
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 10:26:48 UTC
*** Bug 1021226 has been marked as a duplicate of this bug. ***

Comment 8 Scott Lewis 2013-11-19 16:54:24 UTC
Auto adding >= MODIFIED bugs to beta

Comment 10 Pavel Sedlák 2013-12-13 14:15:29 UTC
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 21:28:14 UTC
Pavel, you wrote on rhos-docs: 
"[21:09] <psedlak> hi, i have issue with Doc Text of https://bugzilla.redhat.com/show_bug.cgi?id=1021405
[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-20 00:30:06 UTC
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.

http://rhn.redhat.com/errata/RHEA-2013-1859.html

Comment 15 Red Hat Bugzilla 2023-09-14 01:52:19 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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