← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2093258] Re: HTTP500 returned on get ports due to AttributeError when extracting tags

 

Reviewed:  https://review.opendev.org/c/openstack/neutron-lib/+/940682
Committed: https://opendev.org/openstack/neutron-lib/commit/e2d68e39f5e62be9ca8a247b3f957e5e2d4ec3a3
Submitter: "Zuul (22348)"
Branch:    master

commit e2d68e39f5e62be9ca8a247b3f957e5e2d4ec3a3
Author: Rodolfo Alonso <ralonsoh@xxxxxxxxxx>
Date:   Tue Feb 4 09:49:14 2025 +0000

    Revert "Change the ``StandardAttribute`` load method to "selectin""
    
    This reverts commit 7f702af482b6b47f2fe74a8b475fb2a23cb5f7a4.
    
    Reason for revert: this patch was introduced to make the database
    produced code compatible with PostgreSQL. During this cycle we
    dropped the support for this backend. This patch is probably
    introducing a race condition when retrieving the port standard
    attributes because these are retrieved in a second SQL query
    (lazy='selectin').
    
    In order to keep a healthy database engine, supporting
    MariaDB/MySQL, it is better to retrieve the selected field in the
    ``port`` retrieval query instead of issuing a delayed second one.
    
    Closes-Bug: #2093258
    Change-Id: Ida5afffb808597aa09cc62984b36189a8bf409a0


** Changed in: neutron
       Status: In Progress => Fix Released

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

Title:
  HTTP500 returned on get ports due to AttributeError when extracting
  tags

Status in neutron:
  Fix Released

Bug description:
  Observed in Manila CI
  https://zuul.opendev.org/t/openstack/build/a5bd3cbd0212488f8ed9fda58bb82f87

  nova call of GET /servers/<uuid> failed due to Neutron call from nova to neutron failed with the following (relevant) traceback in the log
  ```
  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR neutron.pecan_wsgi.hooks.translation   File "/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 1682, in get_ports

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     items =
  [self._make_port_dict(c, fields, bulk=True) for c in query]

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation   File
  "/opt/stack/neutron/neutron/db/db_base_plugin_v2.py", line 1682, in
  <listcomp>

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     items =
  [self._make_port_dict(c, fields, bulk=True) for c in query]

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation   File
  "/opt/stack/neutron/neutron/db/db_base_plugin_common.py", line 257, in
  _make_port_dict

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     resource_extend.apply_funcs(

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation   File
  "/opt/stack/data/venv/lib/python3.10/site-
  packages/oslo_utils/timeutils.py", line 323, in wrapper

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     result = func(*args,
  **kwargs)

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation   File
  "/opt/stack/data/venv/lib/python3.10/site-
  packages/neutron_lib/db/resource_extend.py", line 91, in apply_funcs

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     resolved_func(response,
  db_object)

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation   File
  "/opt/stack/neutron/neutron/services/tag/tag_plugin.py", line 54, in
  _extend_tags_dict

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation     tag_db.tag for tag_db in
  db_data.standard_attr.tags

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation AttributeError: 'NoneType' object
  has no attribute 'tags'

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: ERROR
  neutron.pecan_wsgi.hooks.translation

  Jan 08 11:22:23.584731 np0039510017 neutron-server[71609]: INFO neutron.api.wsgi [req-c75cc024-5d56-4c07-b3b9-21311a8c3bb3 req-da3c34fb-4fbd-4ee5-9e99-04abf8c32479 tempest-ShareManageUnmanageNFS-1913085872 tempest-ShareManageUnmanageNFS-1913085872-project-member] 213.32.74.253,213.32.74.253 "GET /networking/v2.0/ports?device_id=f27bdfcc-4873-4eaf-8372-0ecf7cbcef10 HTTP/1.1" status: 500  len: 368 time: 0.0610847
  ```

  looks sporadic, and may be hides some other issue..

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



References