neutron revision_number does not bump on network update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Slawek Kaplonski |
Bug Description
neutron revision_number does not bump on network update
I tested the exact same mechanism with the subnet resource and an update to the same field (description) and it works like a charm. For the network resource, the revision number is not updated when updating the field, instead there's an inconsitency checker which fixesthe inconsistency from time to time
Here's the output of my go application calling into the API and updating resources (with a slightly modified version of gophercloud):
~~~
[stack@standalone gophercloud-test]$ go run main.go -network-id 674bf675-
I0715 13:06:18.881525 561527 main.go:101] Getting network
================> akaris GET map[network:
I0715 13:06:19.063586 561527 main.go:103] Revision number is: 40
I0715 13:06:21.063986 561527 main.go:107] Updating network
-----> akaris PUT https:/
I0715 13:06:25.666203 561527 main.go:124] Updating network again
I0715 13:06:25.666231 561527 main.go:130] Revision number is: 40
-----> akaris PUT https:/
================> akaris GET map[network:
I0715 13:06:28.093811 561527 main.go:138] &{674bf675-
I0715 13:06:30.094846 561527 main.go:142] Getting network
================> akaris GET map[network:
I0715 13:06:30.210418 561527 main.go:144] Revision number is: 40
I0715 13:06:32.211495 561527 main.go:148] Resetting network
-----> akaris PUT https:/
~~~
Here's the neutron output for that same test:
~~~
stack@standalone gophercloud]$ while true; do date ; openstack network show 674bf675-
Fri Jul 15 13:06:15 UTC 2022
+----
| Field | Value |
+----
| description | |
| revision_number | 40 |
+----
Fri Jul 15 13:06:18 UTC 2022
+----
| Field | Value |
+----
| description | |
| revision_number | 40 |
+----
Fri Jul 15 13:06:22 UTC 2022
+----
| Field | Value |
+----
| description | test |
| revision_number | 40 |
+----
Fri Jul 15 13:06:25 UTC 2022
+----
| Field | Value |
+----
| description | test2 |
| revision_number | 40 |
+----
Fri Jul 15 13:06:29 UTC 2022
+----
| Field | Value |
+----
| description | test2 |
| revision_number | 40 |
+----
~~~
Changed in neutron: | |
status: | New → Confirmed |
Changed in neutron: | |
importance: | Undecided → Low |
Changed in neutron: | |
assignee: | nobody → Slawek Kaplonski (slaweq) |
description: | updated |
The last revision bump happened due to an inconsistency check, indicating that something on the updates is clearly not updating the revision number: facb-46df- 99b3-4bb32b3bd9 74 - - - - -] Submitting periodic callback 'networking_ ovn.common. maintenance. DBInconsistenci esPeriodics. check_for_ inconsistencies ' _process_scheduled /usr/lib/ python3. 6/site- packages/ futurist/ periodics. py:639 ovn.common. maintenance [req-74ee1d8f- facb-46df- 99b3-4bb32b3bd9 74 - - - - -] Maintenance task: Synchronizing Neutron and OVN databases check_for_ inconsistencies /usr/lib/ python3. 6/site- packages/ networking_ ovn/common/ maintenance. py:342 ovn.common. maintenance [req-74ee1d8f- facb-46df- 99b3-4bb32b3bd9 74 - - - - -] Maintenance task: Number of inconsistencies found at create/update: networks=1 _log /usr/lib/ python3. 6/site- packages/ networking_ ovn/common/ maintenance. py:323 ovn.common. maintenance [req-74ee1d8f- facb-46df- 99b3-4bb32b3bd9 74 - - - - -] Maintenance task: Fixing resource 674bf675- 0382-4524- 86f6-be1b677e1c 12 (type: networks) at create/update check_for_ inconsistencies /usr/lib/ python3. 6/site- packages/ networking_ ovn/common/ maintenance. py:354 backend. ovs_idl. transaction [-] Running txn n=1 command(idx=0): CheckRevisionNu mberCommand( name=neutron- 674bf675- 0382-4524- 86f6-be1b677e1c 12, resource={'id': '674bf675- 0382-4524- 86f6-be1b677e1c 12', 'name': 'akaris-test', 'tenant_id': '6f69c87fe95b46 9c8c7709382818a cf6', 'admin_state_up': True, 'mtu': 1442, 'status': 'ACTIVE', 'subnets': ['10ee214c- e8df-4f1a- af0b-4c9b64db64 e3'], 'shared': False, 'availability_ zone_hints' : [], 'availability_ zones': [], 'ipv4_address_ scope': None, 'ipv6_address_ scope': None, 'router:external': False, 'vlan_transparent': None, 'description': '', 'qos_policy_id': None, 'port_security_ enabled' : True, 'dns_domain': '', 'l2_adjacency': True, 'tags': [], 'created_at': '2022-07- 15T11:15: 29Z', 'updated_at': '2022-07- 15T12:54: 59Z', 'revision_number': 40, 'project_id': '6f69c87fe95b46 9c8c7709382818a cf6', 'provider: network_ type': 'geneve', 'provider: physical_ network' : None, 'provider: segmentation_ id': 30264}, resource_ type=networks, if_exists=True) do_commit /usr/lib/ python3. 6/site- packages/ ovsdbapp/ backend/ ovs_idl/ transaction. py:89 backend. ovs_idl. transaction [-] Running txn n=1 command(idx=1): DbSetCommand( table=Logical_ Switch, record= neutron- 674bf675- 0382-4524- 86f6-be1b677e1c 12, col_values= (('external_ ids', {'neutron: network_ name': 'akaris-test', 'neutron:mtu': '1442', 'neutron: revision_ number' : '40'}), ('other_config', {'mcast_snoop': 'false', 'mcast_ flood_unregiste red': 'false', 'vlan-passthru': 'false'}))) do_commit /usr/lib/ python3. 6/site- packages/ ovsdbapp/ backend/ ovs_idl/ transaction. py:89 ovn.ovsdb. ovsdb_monitor [-] Hash Ring: Node 92c9941f- 1c88-443d- 956a-f3a17ceb94 36 (host: standalone. shiftstack) handling event "update" for row 888507e7- 8932-456c- b2ba-4410e8a763 0f (table: Logical_...
~~~
2022-07-15 12:59:34.481 40 DEBUG futurist.periodics [req-74ee1d8f-
2022-07-15 12:59:34.490 40 DEBUG networking_
2022-07-15 12:59:34.491 40 DEBUG networking_
2022-07-15 12:59:34.491 40 DEBUG networking_
2022-07-15 12:59:34.579 40 DEBUG ovsdbapp.
2022-07-15 12:59:34.579 40 DEBUG ovsdbapp.
2022-07-15 12:59:34.596 25 DEBUG networking_