Log statement improperly output in nova-manage

Bug #1018431 reported by Jay Pipes
30
This bug affects 8 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Davanum Srinivas (DIMS)
Folsom
Fix Released
Low
Nikola Đipanov

Bug Description

Not sure if it's worth fixing, since we're not focusing on nova-manage, but thought I'd log it anyway as a low-hanging fruit:

http://paste.openstack.org/show/18891/

Looks like the SQLlchemy log handler isn't being set up correctly.

Thierry Carrez (ttx)
tags: added: nova-manage
Revision history for this message
Qiu Yu (unicell) wrote :

Well, it is not a bug actually, but due to the debug level setting.

The log message occurs when nova-manage trying to retrieve network information, via DB api layer, which in turn lazy-loaded SQLAlchemy database backend. And it honors the global logging level.

According to default devstack setting, FLAGS.verbose is set in nova.conf, which set the global DEBUG logging level.

Please try to comment out "verbose=True" in nova.conf, and you'll not see this log statement again.

Changed in nova:
assignee: nobody → unicell (unicell)
status: Confirmed → Invalid
Revision history for this message
Jay Pipes (jaypipes) wrote :

This is a bug. nova-manage executable needs to set up logging. Someone shouldn't need to modify nova.conf just to not see random SQLAlchemy debug messages pop out in nova-manage.

Changed in nova:
status: Invalid → Triaged
Revision history for this message
Qiu Yu (unicell) wrote :

Point taken.

My understanding is that, SQLAlchemy backend loading code is not just for nova-manage, but for all nova code that need database access. So it is pretty reasonable that flag setting in nova.conf could generate this debug message, not only for nova-manage, but for all nova components that invokes database backend loading.

After all, nova-manage shares the same DB layer codebase with other modules. So either nova-manage use its own database code, or... we can simply remove this debugging message for all nova components.

Qiu Yu (unicell)
Changed in nova:
assignee: unicell (unicell) → nobody
Revision history for this message
John Tran (jtran) wrote :

It appears that it's not SQLAlchemy raising this DEBUG, it's nova.utils.LazyPluggable.__get_backend line 484

460 class LazyPluggable(object):
 461 """A pluggable backend loaded lazily based on some value."""
 462
 463 def __init__(self, pivot, **backends):
 464 self.__backends = backends
 465 self.__pivot = pivot
 466 self.__backend = None
 467
 468 def __get_backend(self):
 469 if not self.__backend:
 470 backend_name = FLAGS[self.__pivot]
 471 if backend_name not in self.__backends:
 472 msg = _('Invalid backend: %s') % backend_name
 473 raise exception.NovaException(msg)
 474
 475 backend = self.__backends[backend_name]
 476 if isinstance(backend, tuple):
 477 name = backend[0]
 478 fromlist = backend[1]
 479 else:
 480 name = backend
 481 fromlist = backend
 482
 483 self.__backend = __import__(name, None, None, fromlist)
 484 LOG.debug(_('backend %s'), self.__backend)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/14685

Changed in nova:
assignee: nobody → Davanum Srinivas (dims-v)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/14685
Committed: http://github.com/openstack/nova/commit/6b137d8bec08a170e06fc011637c620fe76cf90d
Submitter: Jenkins
Branch: master

commit 6b137d8bec08a170e06fc011637c620fe76cf90d
Author: Davanum Srinivas <email address hidden>
Date: Tue Oct 23 12:48:59 2012 -0400

    Fix bad Log statement in nova-manage

    Remove the log statement per discussion in the bug report
    https://bugs.launchpad.net/nova/+bug/1018431/comments/3

    Fixes bug 1018431

    Change-Id: Ia6fe511ae23155de8b78689639b53a0d9ed1d051

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/24800

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/folsom)

Reviewed: https://review.openstack.org/24800
Committed: http://github.com/openstack/nova/commit/28aacf640b8fa67b528f875689a1d0ad1b052e2e
Submitter: Jenkins
Branch: stable/folsom

commit 28aacf640b8fa67b528f875689a1d0ad1b052e2e
Author: Davanum Srinivas <email address hidden>
Date: Tue Oct 23 12:48:59 2012 -0400

    Fix bad Log statement in nova-manage

    Remove the log statement per discussion in the bug report
    https://bugs.launchpad.net/nova/+bug/1018431/comments/3

    Fixes bug 1018431

    Change-Id: Ia6fe511ae23155de8b78689639b53a0d9ed1d051
    (cherry picked from commit 6b137d8bec08a170e06fc011637c620fe76cf90d)

Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.