← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1288188] Re: unwanted lbaas related error logs in q-svc screen

 

** Changed in: oslo
       Status: Fix Committed => Fix Released

** Changed in: oslo
    Milestone: None => icehouse-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1288188

Title:
  unwanted lbaas related error logs in q-svc screen

Status in OpenStack Neutron (virtual network service):
  Fix Released
Status in Oslo - a Library of Common OpenStack Code:
  Fix Released

Bug description:
  2014-03-03 09:25:31.621 5910 ERROR root [-] Original exception being dropped: ['Traceback (most recent call last):\n', '  File "/opt/stack/new/neutron/neutron/db/loadbalancer/loadbalancer_db.py", line 206, in _get_resource\n    r = self._get_by_id(context, model, id)\n', '  File "/opt/stack/new/neutron/neutron/db/db_base_plugin_v2.py", line 144, in _get_by_id\n    return query.filter(model.id == id).one()\n', '  File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2323, in one\n    raise orm_exc.NoResultFound("No row was found for one()")\n', 'NoResultFound: No row was found for one()\n']
  2014-03-03 09:25:31.622 5910 WARNING neutron.services.loadbalancer.drivers.common.agent_driver_base [req-6949f3b4-f991-48b7-8424-b3bfbca7c822 None] Cannot update status: member d439c879-55f7-400f-b6a8-32753f057b05 not found in the DB, it was probably deleted concurrently

  There is no need for error log about original exception being dropped as warning log is enough.
  This happens due to using save_and_reraise_exception() in loadbalancer_db code:

      def _get_resource(self, context, model, id):
          try:
              r = self._get_by_id(context, model, id)
          except exc.NoResultFound:
              with excutils.save_and_reraise_exception():
                  if issubclass(model, Vip):
                      raise loadbalancer.VipNotFound(vip_id=id)
                  elif issubclass(model, Pool):
                      raise loadbalancer.PoolNotFound(pool_id=id)
                  elif issubclass(model, Member):
                      raise loadbalancer.MemberNotFound(member_id=id)
                  elif issubclass(model, HealthMonitor):
                      raise loadbalancer.HealthMonitorNotFound(monitor_id=id)
          return r

  where the whole purpose of exception handler is to reraise proper type
  of exception.

  I think save_and_reraise_exception() was designed for cases when new exceptions raised inside exception handler are not expected. 
  In this particular case I don't see the reason for using save_and_reraise_exception().

  As an option I think a parameter can be added to
  save_and_reraise_exception() constructor to disable logging.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1288188/+subscriptions


References