← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1973049] Re: Skip DB retry when update on "standardattributes" fails

 

We discussed this during last drivers meeting (see [1]) and we agreed to
keep current behaviour with db retries, as the above proposal could
introduce more problems.


[1]: https://meetings.opendev.org/meetings/neutron_drivers/2022/neutron_drivers.2022-05-13-14.01.log.html#l-37

** Changed in: neutron
       Status: New => Won't Fix

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

Title:
  Skip DB retry when update on "standardattributes" fails

Status in neutron:
  Won't Fix

Bug description:
  This is a recurrent problem in the Neutron server when updating a
  resource that has "standardattributes". If a concurrent update is
  done, the DB (SQLAlchemy) will return a "StaleDataError" exception.
  E.g.: [1]

  """
  UPDATE statement on table 'standardattributes' expected to update 1 row(s); 0 were matched.
  """

  In this case, the whole transaction is retried. We should avoid
  retrying any DB operation if this error happens. This retry decorator
  is affecting some operations with [2] in place, as reported in [3].

  This is very frequent when updating the port status
  (``neutron.plugins.ml2.plugin.Ml2Plugin.update_port_statuses``) or the
  FIP status
  (``neutron.db.l3_db.L3_NAT_dbonly_mixin.update_floatingip_status``).
  Check [4]. This is a CI execution using [2], now released in neutron-
  lib 2.21.0. Those methods are concurrently called from the agents
  (ML2, L3) to set the port/FIP status (UP/DOWN).

  This bug proposes to remove this check when updating the
  "standardattributes" table. If the resource "standardattributes" is
  not updated correctly, don't raise a
  ``sqlalchemy.orm.exc.StaleDataError`` exception.

  NOTE: check the ``StandardAttribute.__mapper_args__`` parameters,
  probably deleting "version_id_col".

  [1]https://paste.opendev.org/show/b6xIzuXLgswCpuQeEr6i/
  [2]https://review.opendev.org/c/openstack/neutron-lib/+/828738
  [3]https://review.opendev.org/c/openstack/neutron/+/841246
  [4]https://31025e2d1118fe413f77-2d2bdd86d83b89e6c319788cb06ef691.ssl.cf1.rackcdn.com/841396/1/check/neutron-tempest-plugin-scenario-openvswitch/5b532c4/controller/logs/screen-q-svc.txt

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



References