← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1745386] [NEW] Update FloatingIP to set QoS policy on it fails

 

Public bug reported:

When Floating IP is created without QoS policy set and user want's to
add QoS policy to it with PUT request:

curl -g -i -X PUT
http://145.239.30.57:9696/v2.0/floatingips/bb2d8b79-5b09-4fe0-a8cf-
f6e011873ca2 -H "User-Agent: python-neutronclient" -H "Accept:
application/json" -H "X-Auth-Token: XXX" -d '{"floatingip": {"port_id":
"b33dfa98-97b9-4573-a45b-fb841848e068", "qos_policy_id":
"b30259f1-ac07-4d03-b628-f7e1b1e64ea1"}}'


it fails on neutron-server side.
Neutron error is:
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource [None req-456534d5-541d-434f-b4c9-9ebd1f3be830 demo admin] update failed: No details.: StaleDataError: UPDATE statement on table 'standardatt
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource Traceback (most recent call last):
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 98, in resource
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     result = method(request=request, **args)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 608, in update
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return self._update(request, id, body, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 91, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     setattr(e, '_RETRY_EXCEEDED', True)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 87, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 147, in wrapper
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 135, in wrapper
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 126, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     LOG.debug("Retry wrapper got retriable exception: %s", e)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 122, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*dup_args, **dup_kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 656, in _update
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     obj = obj_updater(request.context, id, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 161, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return method(*args, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 91, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     setattr(e, '_RETRY_EXCEEDED', True)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 87, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 147, in wrapper
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 135, in wrapper
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 126, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     LOG.debug("Retry wrapper got retriable exception: %s", e)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 122, in wrapped
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*dup_args, **dup_kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/l3_dvr_db.py", line 1055, in update_floatingip
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     context, id, floatingip)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/l3_db.py", line 1393, in _update_floatingip
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     context, id=floatingip_obj.id)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/base.py", line 547, in get_object
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     **cls.modify_fields_to_db(kwargs)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/db/api.py", line 32, in get_object
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return _get_filter_query(context, model, **kwargs).first()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/db/api.py", line 28, in _get_filter_query
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return query
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 567, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.rollback()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 564, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.commit()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 461, in commit
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self._prepare_impl()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.session.flush()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2192, in flush
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self._flush(objects)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2312, in _flush
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     transaction.rollback(_capture_exception=True)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2276, in _flush
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     flush_context.execute()
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     rec.execute(self)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     uow
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     mapper, table, update)
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 760, in _emit_update_statements
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     (table.description, len(records), rows))
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource StaleDataError: UPDATE statement on table 'standardattributes' expected to update 1 row(s); 0 were matched.
Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource


>From what I found it fails only when old_qos_policy was None and we want to set some policy on FIP.
It not fails if lines:

        if not floatingip_obj.db_obj.qos_policy_binding:
            floatingip_obj.db_obj.qos_policy_binding = qos_policy_binding

from
https://github.com/openstack/neutron/blob/master/neutron/db/l3_fip_qos.py#L85
are removed.

** Affects: neutron
     Importance: Medium
         Status: Confirmed


** Tags: qos

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

Title:
  Update FloatingIP to set QoS policy on it fails

Status in neutron:
  Confirmed

Bug description:
  When Floating IP is created without QoS policy set and user want's to
  add QoS policy to it with PUT request:

  curl -g -i -X PUT
  http://145.239.30.57:9696/v2.0/floatingips/bb2d8b79-5b09-4fe0-a8cf-
  f6e011873ca2 -H "User-Agent: python-neutronclient" -H "Accept:
  application/json" -H "X-Auth-Token: XXX" -d '{"floatingip":
  {"port_id": "b33dfa98-97b9-4573-a45b-fb841848e068", "qos_policy_id":
  "b30259f1-ac07-4d03-b628-f7e1b1e64ea1"}}'

  
  it fails on neutron-server side.
  Neutron error is:
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource [None req-456534d5-541d-434f-b4c9-9ebd1f3be830 demo admin] update failed: No details.: StaleDataError: UPDATE statement on table 'standardatt
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource Traceback (most recent call last):
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/resource.py", line 98, in resource
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     result = method(request=request, **args)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 608, in update
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return self._update(request, id, body, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 91, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     setattr(e, '_RETRY_EXCEEDED', True)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 87, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 147, in wrapper
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 135, in wrapper
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 126, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     LOG.debug("Retry wrapper got retriable exception: %s", e)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 122, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*dup_args, **dup_kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/api/v2/base.py", line 656, in _update
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     obj = obj_updater(request.context, id, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 161, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return method(*args, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 91, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     setattr(e, '_RETRY_EXCEEDED', True)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 87, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 147, in wrapper
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     ectxt.value = e.inner_exc
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 135, in wrapper
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*args, **kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 126, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     LOG.debug("Retry wrapper got retriable exception: %s", e)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.force_reraise()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     six.reraise(self.type_, self.value, self.tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/api.py", line 122, in wrapped
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return f(*dup_args, **dup_kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/l3_dvr_db.py", line 1055, in update_floatingip
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     context, id, floatingip)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/db/l3_db.py", line 1393, in _update_floatingip
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     context, id=floatingip_obj.id)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/base.py", line 547, in get_object
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     **cls.modify_fields_to_db(kwargs)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/db/api.py", line 32, in get_object
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return _get_filter_query(context, model, **kwargs).first()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/opt/stack/neutron/neutron/objects/db/api.py", line 28, in _get_filter_query
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     return query
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 567, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.rollback()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 564, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.commit()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 461, in commit
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self._prepare_impl()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 441, in _prepare_impl
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self.session.flush()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2192, in flush
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     self._flush(objects)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2312, in _flush
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     transaction.rollback(_capture_exception=True)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2276, in _flush
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     flush_context.execute()
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 389, in execute
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     rec.execute(self)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 548, in execute
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     uow
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 177, in save_obj
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     mapper, table, update)
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 760, in _emit_update_statements
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource     (table.description, len(records), rows))
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource StaleDataError: UPDATE statement on table 'standardattributes' expected to update 1 row(s); 0 were matched.
  Jan 25 14:42:02 devstack-master-linuxbridge neutron-server[12944]: ERROR neutron.api.v2.resource

  
  From what I found it fails only when old_qos_policy was None and we want to set some policy on FIP.
  It not fails if lines:

          if not floatingip_obj.db_obj.qos_policy_binding:
              floatingip_obj.db_obj.qos_policy_binding = qos_policy_binding

  from
  https://github.com/openstack/neutron/blob/master/neutron/db/l3_fip_qos.py#L85
  are removed.

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


Follow ups