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.
This is what we see in the neutron database when it happens:
MariaDB [ovs_neutron]> select * from ipallocations; ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -----+ ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -----+ 3f78-4056- a228-1570f9b33a 86 | 169.254.192.3 | 88144aa4- c7e4-4add- bc25-ef7a84c48b 90 | 30f0d27e- 28ca-4c2f- 9328-dcb8f60b8b 3b | e827-4a84- 9864-3f27ba1339 22 | 169.254.192.11 | 88144aa4- c7e4-4add- bc25-ef7a84c48b 90 | 30f0d27e- 28ca-4c2f- 9328-dcb8f60b8b 3b | e947-45ef- 8c7d-e3dc2ee613 4b | 2003::f816: 3eff:fec4: 2a93 | eed623f4- cbad-488c- b230-7f4a8b1514 eb | eb341132- 6d55-4fb6- ba47-9dc2c48327 9a | 3765-4a7b- a3e4-08a7691b81 b5 | 2003::f816: 3eff:fecb: 6ecd | 6460e359- 02c5-4414- a5ed-b0c0b16442 d8 | 1b5068f9- 0137-4ffd- a728-59ebf475da 89 | 33ea-46c3- b222-08f5eccde4 a5 | 2003::f816: 3eff:fed2: 5006 | eed623f4- cbad-488c- b230-7f4a8b1514 eb | eb341132- 6d55-4fb6- ba47-9dc2c48327 9a | 7163-456f- 8abc-5cb0379289 bd | 2003::f816: 3eff:fea0: 8a1b | ae170789- 7e4a-4bad- 8e71-ad450b080e c3 | ad34d9bd- af3f-4c14- a6ce-c6f71755b0 10 | 93b9-4bba- 92ad-e9420a68e0 73 | 2003::f816: 3eff:fe2f: c74 | ae170789- 7e4a-4bad- 8e71-ad450b080e c3 | ad34d9bd- af3f-4c14- a6ce-c6f71755b0 10 | 53a4-4f06- 984d-93b5be91e1 fb | 2003::f816: 3eff:feef: a17c | eed623f4- cbad-488c- b230-7f4a8b1514 eb | eb341132- 6d55-4fb6- ba47-9dc2c48327 9a | e417-4dd3- 91d2-110b125d5c 6d | 2003::f816: 3eff:fef3: 90e6 | ae170789- 7e4a-4bad- 8e71-ad450b080e c3 | ad34d9bd- af3f-4c14- a6ce-c6f71755b0 10 | 9297-413c- 9e8e-3ad6c480eb 3d | 10.0.0.222 | 77cf5146- 93fd-4568- b3a9-bd5f01ae49 33 | 6ad06166- 6413-4316- 93ed-26a4f13d22 f5 | b7d1-45f3- ba1b-12354fb3a0 3b | 2003::f816: 3eff:feb1: 17e | 6460e359- 02c5-4414- a5ed-b0c0b16442 d8 | 1b5068f9- 0137-4ffd- a728-59ebf475da 89 | 351d-44cf- 996c-7feb940def 55 | 169.254.192.9 | 88144aa4- c7e4-4add- bc25-ef7a84c48b 90 | 30f0d27e- 28ca-4c2f- 9328-dcb8f60b8b 3b | 8cdb-47ce- 839d-11c26538ec e3 | 2003::f816: 3eff:feae: 40c6 | 6460e359- 02c5-4414- a5ed-b0c0b16442 d8 | 1b5068f9- 0137-4ffd- a728-59ebf475da 89 | ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ------- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -----+
+------
| port_id | ip_address | subnet_id | network_id |
+------
| 05c2f5b2-
| 1e9fde35-
| 32f6ff50-
| 492fcd7b-
| 687018c4-
| 839c36b3-
| 91219016-
| 9b57e452-
| bc07db93-
| c2cbbb71-
| c2f43e30-
| d0b0acfc-
| f0a5b408-
+------
13 rows in set (0.00 sec)
MariaDB [ovs_neutron]> select * from ipamallocations; ------- ------- ------- +------ -----+- ------- ------- ------- ------- ------- --+ ------- ------- ------- +------ -----+- ------- ------- ------- ------- ------- --+ cd96-485d- 8706-a81d881be9 4c | d8b7-4b67- 8f8e-b1294f2ef4 fb | d8b7-4b67- 8f8e-b1294f2ef4 fb | d8b7-4b67- 8f8e-b1294f2ef4 fb | 3eff:fea0: 8a1b | ALLOCATED | 68e5647b- 55df-434d- b0f5-06b94d674b e0 | 3eff:feae: 40c6 | ALLOCATED | aa13d3d6- 23ca-4204- 82cf-8fbc295b4e 59 | 3eff:fec4: 2a93 | ALLOCATED | dbd93fe8- 413d-4be1- 8bff-41380daf48 01 | 3eff:fecb: 6ecd | ALLOCATED | aa13d3d6- 23ca-4204- 82cf-8fbc295b4e 59 | 3eff:feef: a17c | ALLOCATED | dbd93fe8- 413d-4be1- 8bff-41380daf48 01 | 3eff:fef3: 90e6 | ALLOCATED | 68e5647b- 55df-434d- b0f5-06b94d674b e0 | ------- ------- ------- +------ -----+- ------- ------- ------- ------- ------- --+
+------
| ip_address | status | ipam_subnet_id |
+------
| 10.0.0.222 | ALLOCATED | 0a5b582e-
| 169.254.192.11 | ALLOCATED | fb50227f-
| 169.254.192.3 | ALLOCATED | fb50227f-
| 169.254.192.9 | ALLOCATED | fb50227f-
| 2003::f816:
| 2003::f816:
| 2003::f816:
| 2003::f816:
| 2003::f816:
| 2003::f816:
+------
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-7f4a8b1514 eb
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.