Comment 11 for bug 1706750

Revision history for this message
Ihar Hrachyshka (ihar-hrachyshka) wrote :

This is what we see in the neutron database when it happens:

MariaDB [ovs_neutron]> select * from ipallocations;
+--------------------------------------+---------------------------+--------------------------------------+--------------------------------------+
| port_id | ip_address | subnet_id | network_id |
+--------------------------------------+---------------------------+--------------------------------------+--------------------------------------+
| 05c2f5b2-3f78-4056-a228-1570f9b33a86 | 169.254.192.3 | 88144aa4-c7e4-4add-bc25-ef7a84c48b90 | 30f0d27e-28ca-4c2f-9328-dcb8f60b8b3b |
| 1e9fde35-e827-4a84-9864-3f27ba133922 | 169.254.192.11 | 88144aa4-c7e4-4add-bc25-ef7a84c48b90 | 30f0d27e-28ca-4c2f-9328-dcb8f60b8b3b |
| 32f6ff50-e947-45ef-8c7d-e3dc2ee6134b | 2003::f816:3eff:fec4:2a93 | eed623f4-cbad-488c-b230-7f4a8b1514eb | eb341132-6d55-4fb6-ba47-9dc2c483279a |
| 492fcd7b-3765-4a7b-a3e4-08a7691b81b5 | 2003::f816:3eff:fecb:6ecd | 6460e359-02c5-4414-a5ed-b0c0b16442d8 | 1b5068f9-0137-4ffd-a728-59ebf475da89 |
| 687018c4-33ea-46c3-b222-08f5eccde4a5 | 2003::f816:3eff:fed2:5006 | eed623f4-cbad-488c-b230-7f4a8b1514eb | eb341132-6d55-4fb6-ba47-9dc2c483279a |
| 839c36b3-7163-456f-8abc-5cb0379289bd | 2003::f816:3eff:fea0:8a1b | ae170789-7e4a-4bad-8e71-ad450b080ec3 | ad34d9bd-af3f-4c14-a6ce-c6f71755b010 |
| 91219016-93b9-4bba-92ad-e9420a68e073 | 2003::f816:3eff:fe2f:c74 | ae170789-7e4a-4bad-8e71-ad450b080ec3 | ad34d9bd-af3f-4c14-a6ce-c6f71755b010 |
| 9b57e452-53a4-4f06-984d-93b5be91e1fb | 2003::f816:3eff:feef:a17c | eed623f4-cbad-488c-b230-7f4a8b1514eb | eb341132-6d55-4fb6-ba47-9dc2c483279a |
| bc07db93-e417-4dd3-91d2-110b125d5c6d | 2003::f816:3eff:fef3:90e6 | ae170789-7e4a-4bad-8e71-ad450b080ec3 | ad34d9bd-af3f-4c14-a6ce-c6f71755b010 |
| c2cbbb71-9297-413c-9e8e-3ad6c480eb3d | 10.0.0.222 | 77cf5146-93fd-4568-b3a9-bd5f01ae4933 | 6ad06166-6413-4316-93ed-26a4f13d22f5 |
| c2f43e30-b7d1-45f3-ba1b-12354fb3a03b | 2003::f816:3eff:feb1:17e | 6460e359-02c5-4414-a5ed-b0c0b16442d8 | 1b5068f9-0137-4ffd-a728-59ebf475da89 |
| d0b0acfc-351d-44cf-996c-7feb940def55 | 169.254.192.9 | 88144aa4-c7e4-4add-bc25-ef7a84c48b90 | 30f0d27e-28ca-4c2f-9328-dcb8f60b8b3b |
| f0a5b408-8cdb-47ce-839d-11c26538ece3 | 2003::f816:3eff:feae:40c6 | 6460e359-02c5-4414-a5ed-b0c0b16442d8 | 1b5068f9-0137-4ffd-a728-59ebf475da89 |
+--------------------------------------+---------------------------+--------------------------------------+--------------------------------------+
13 rows in set (0.00 sec)

MariaDB [ovs_neutron]> select * from ipamallocations;
+---------------------------+-----------+--------------------------------------+
| ip_address | status | ipam_subnet_id |
+---------------------------+-----------+--------------------------------------+
| 10.0.0.222 | ALLOCATED | 0a5b582e-cd96-485d-8706-a81d881be94c |
| 169.254.192.11 | ALLOCATED | fb50227f-d8b7-4b67-8f8e-b1294f2ef4fb |
| 169.254.192.3 | ALLOCATED | fb50227f-d8b7-4b67-8f8e-b1294f2ef4fb |
| 169.254.192.9 | ALLOCATED | fb50227f-d8b7-4b67-8f8e-b1294f2ef4fb |
| 2003::f816:3eff:fea0:8a1b | ALLOCATED | 68e5647b-55df-434d-b0f5-06b94d674be0 |
| 2003::f816:3eff:feae:40c6 | ALLOCATED | aa13d3d6-23ca-4204-82cf-8fbc295b4e59 |
| 2003::f816:3eff:fec4:2a93 | ALLOCATED | dbd93fe8-413d-4be1-8bff-41380daf4801 |
| 2003::f816:3eff:fecb:6ecd | ALLOCATED | aa13d3d6-23ca-4204-82cf-8fbc295b4e59 |
| 2003::f816:3eff:feef:a17c | ALLOCATED | dbd93fe8-413d-4be1-8bff-41380daf4801 |
| 2003::f816:3eff:fef3:90e6 | ALLOCATED | 68e5647b-55df-434d-b0f5-06b94d674be0 |
+---------------------------+-----------+--------------------------------------+

Note that some ipallocations don't have corresponding ipamallocations. When I try to delete the network holding one of those ipallocations, I get:

Unable to find IP address 2003::f816:3eff:fed2:5006 on subnet eed623f4-cbad-488c-b230-7f4a8b1514eb

That's because of the discrepancy between the number of ipam and ip allocations in the db. I think this is the culprit. Now trying to understand how can we persist one but not the other.