Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1578254

Summary: nova-scheduler and nova-conductor are not starting when we enable connection_trace=true in nova.conf under database section
Product: Red Hat OpenStack Reporter: Gyanendra Kumar <gkumar>
Component: python-oslo-dbAssignee: Michael Bayer <mbayer>
Status: CLOSED ERRATA QA Contact: pkomarov
Severity: high Docs Contact:
Priority: high    
Version: 8.0 (Liberty)CC: apevec, berrange, chjones, dasmith, dciabrin, eglynn, jhakimra, kchamart, lhh, mbayer, owalsh, pkomarov, sbauza, sferdjao, sgordon, srevivo, vromanso
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: python-oslo-db-2.6.0-7.el7ost Doc Type: Bug Fix
Doc Text:
Previously, the `connection_trace` option of oslo.db was hardcoded to require the `oslo_db.tests` python package, which was not packaged as part of Red Hat OpenStack Platform. Consequently, enabling `connection_trace` would cause a Python stack trace. With this update, `connection_trace` conditionally imports `oslo_db.tests`, and continues without error if not present. As a result, enabling `connection_trace` now functions despite `oslo_db.tests` not being present.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-05 12:29:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gyanendra Kumar 2018-05-15 06:35:01 UTC
Description of problem: nova-scheduler and nova-conductor are not starting when we enable connection_trace=true in nova.conf under database section.


Version-Release number of selected component (if applicable):

RHOSP8
RHEL 7.3

nova package version on controller:
openstack-nova-api-12.0.4-16.el7ost.noarch                  Mon Oct 31 20:26:05 2016
openstack-nova-cert-12.0.4-16.el7ost.noarch                 Mon Oct 31 20:26:05 2016
openstack-nova-common-12.0.4-16.el7ost.noarch               Mon Oct 31 20:23:41 2016
openstack-nova-compute-12.0.4-16.el7ost.noarch              Mon Oct 31 20:25:56 2016
openstack-nova-conductor-12.0.4-16.el7ost.noarch            Mon Oct 31 20:26:04 2016
openstack-nova-console-12.0.4-16.el7ost.noarch              Mon Oct 31 20:26:05 2016
openstack-nova-novncproxy-12.0.4-16.el7ost.noarch           Mon Oct 31 20:26:04 2016
openstack-nova-scheduler-12.0.4-16.el7ost.noarch            Mon Oct 31 20:26:04 2016
python-nova-12.0.4-16.el7ost.noarch                         Mon Oct 31 20:23:41 2016
python-novaclient-3.1.0-2.el7ost.noarch                     Mon Oct 31 20:13:22 2016



How reproducible:


Steps to Reproduce:
1. 

On controller2 modify /etc/nova/nova.conf  ,set connection_trace=true  in  [database] :
# Add Python stack traces to SQL as comment strings. (boolean value)
# Deprecated group;name - DEFAULT;sql_connection_trace
connection_trace=true    

Restart nova-scheduler service to take modification into effect:
pcs resource restart openstack-nova-scheduler-clone

Nova-scheduler and nova-conductor services remain stopped on controller2:
 Clone Set: openstack-nova-scheduler-clone [openstack-nova-scheduler]
     Started: [ overcloud-controller-0 overcloud-controller-1 ]
     Stopped: [ overcloud-controller-2 ]
 Clone Set: openstack-nova-conductor-clone [openstack-nova-conductor]
     Started: [ overcloud-controller-0 overcloud-controller-1 ]
     Stopped: [ overcloud-controller-2 ]


Actual results:
Nova-scheduler and nova-conductor services not coming up on controller2:

Expected results:
all nova services started on controller2.

Additional info:

Comment 2 Ollie Walsh 2018-05-17 18:33:31 UTC
Traceback in nova-scheduler shows it's oslo_db trying to reference a module that isn't packaged:

ERROR nova   File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 381, in _add_trace_comments
ERROR nova     os.path.dirname(sys.modules['oslo_db.tests'].__file__),
ERROR nova KeyError: 'oslo_db.tests'

Fixed upstream in https://review.openstack.org/221606 (mitaka/OSP9).

Comment 11 pkomarov 2018-06-06 17:49:58 UTC
Verified,

[stack@undercloud-0 ~]$ rhos-release -L
cat Installed repositories (rhel-7.5):
  8-director
  8
  ceph-1.3
  ceph-osd-1.3
  rhel-7.5
[stack@undercloud-0 ~]$ cat core_puddle_version 
2018-06-04.1

[root@controller-0 ~]# grep connection_trace /etc/nova/nova.conf
connection_trace=true

[root@controller-0 ~]# pcs resource restart openstack-nova-scheduler-clone
openstack-nova-scheduler-clone successfully restarted
 
[root@controller-0 ~]# pcs status |grep -A 1 openstack-nova-scheduler-clone
 Clone Set: openstack-nova-scheduler-clone [openstack-nova-scheduler]
     Started: [ controller-0 ]

Comment 14 errata-xmlrpc 2018-07-05 12:29:07 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.

https://access.redhat.com/errata/RHBA-2018:2133