[OVN] Modifying FIP that is no associated causes ovn_revision_numbers to go stale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Won't Fix
|
Low
|
Unassigned |
Bug Description
NOTE: This is a low priority issue, mostly because it eventually gets fixed by maintenance task. Also because while fip is not associated, there is no
real harm done to the NAT functionality.
CheckRevisionNu
in order to update the OVN_REV_
Ref: http://
Trouble is that unless the floating ip is associated, there will be no entries in OVN's NAT table, causing the call to
db_rev.
to not take place.
Steps to reproduce it:
# create a floating ip but do not associate it with anything so router_id is None
FIP=172.24.4.8
openstack floating ip create --floating-
FIP_UUID=
# Mess with its name, which will bump revision on fip object
openstack floating ip set --description foo ${FIP_UUID}
Code when there is no NAT for a given FIP makes line 1044 skip line 1045
check_rev_
The dbs are now the inconsistent state
mysql> use neutron;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from standardattributes where resource_
+----+-
| id | resource_type | created_at | updated_at | description | revision_number |
+----+-
| 49 | floatingips | 2020-05-18 20:56:51 | 2020-05-18 20:58:58 | foo2 | 2 |
+----+-
1 row in set (0.01 sec)
mysql> select * from ovn_revision_
+------
| standard_attr_id | resource_uuid | resource_type | revision_number | created_at | updated_at |
+------
| 49 | 5a1e1ffa-
+------
1 row in set (0.00 sec)
Maintenance task fixes it up later
May 18 21:50:29 stack neutron-
consistenciesPe
May 18 21:50:29 stack neutron-
ases {{(pid=3186) check_for_
May 18 21:50:29 stack neutron-
create/update: floatingips=1 {{(pid=3186) _log /opt/stack/
May 18 21:50:29 stack neutron-
b538-9ce07ab1a281 (type: floatingips) at create/update {{(pid=3186) check_for_
May 18 21:50:29 stack neutron-
a281 (type: floatingips) to 1
May 18 21:50:29 stack neutron-
seconds)
description: | updated |
description: | updated |
tags: | added: ovn |
Changed in neutron: | |
importance: | Undecided → Low |
This is what the transaction "noop" log looks like:
May 18 20:59:45 stack neutron- server[ 17346]: DEBUG ovsdbapp. backend. ovs_idl. transaction [None req-cbdde0e4- d2fc-4bb2- 91a7-dc82fe6821 27 None None] Running txn n=1 command(idx=0): CheckRevisionNu mberCommand( name=5a1e1ffa- 0312-4e78- b7a0-551c396bcf 6b, resource={'id': '5a1e1ffa- 0312-4e78- b7a0-551c396bcf 6b', 'tenant_id': '159b77c3839247 468362e6841e351 413', 'floating_ ip_address' : '172.24.4.8', 'floating_ network_ id': 'ef1acdcf- 25af-4ec3- 8326-a2922870fe dd', 'router_id': None, 'port_id': None, 'fixed_ip_address': None, 'status': 'DOWN', 'description': 'foo2', 'port_details': None, 'dns_domain': '', 'dns_name': '', 'port_forwardings': [], 'tags': [], 'created_at': '2020-05- 18T20:56: 51Z', 'updated_at': '2020-05- 18T20:58: 58Z', 'revision_number': 2, 'project_id': '159b77c3839247 468362e6841e351 413'}, resource_ type=floatingip s, if_exists=True) {{(pid=17354) do_commit /opt/stack/ ovsdbapp/ ovsdbapp/ backend/ ovs_idl/ transaction. py:87}}
May 18 20:59:45 stack neutron- server[ 17346]: DEBUG ovsdbapp. backend. ovs_idl. transaction [None req-cbdde0e4- d2fc-4bb2- 91a7-dc82fe6821 27 None None] Transaction caused no change {{(pid=17354) do_commit /opt/stack/ ovsdbapp/ ovsdbapp/ backend/ ovs_idl/ transaction. py:124} }