After the following step, the subnet field in the metdadata port is incorrectly updated, it will contain all subnets regardless of the subnet support dhcp or do not.
1.Create two subnets in same network one with enable_dhcp True and the other with enable_dhcp not.[1]
2.Update the first subnet(enable_dhcp True), e.g. subnet name
openstack subnet set --name subnet2-new 639659e1-d11e-445e-8fc0-3f946e71daee
Then metadata port contains both of the two subnets, that's incorrect.[2]
Seems there are two issues, one is we should add enable_dhcp=[1] to filter and the other is we did not clear the subnets disabling.
After the following step, the subnet field in the metdadata port is incorrectly updated, it will contain all subnets regardless of the subnet support dhcp or do not.
1.Create two subnets in same network one with enable_dhcp True and the other with enable_dhcp not.[1] d11e-445e- 8fc0-3f946e71da ee
2.Update the first subnet(enable_dhcp True), e.g. subnet name
openstack subnet set --name subnet2-new 639659e1-
Then metadata port contains both of the two subnets, that's incorrect.[2]
Seems there are two issues, one is we should add enable_dhcp=[1] to filter and the other is we did not clear the subnets disabling.
https:/ /github. com/openstack/ networking- ovn/blob/ 2ccd34397683c0d eab4a76d9eba2d6 1cc8187da8/ networking_ ovn/common/ ovn_client. py#L1158 /github. com/openstack/ networking- ovn/blob/ 2ccd34397683c0d eab4a76d9eba2d6 1cc8187da8/ networking_ ovn/common/ ovn_client. py#L1169
https:/
[1] 427d-45a3- b4e1-35fb322396 a4 ["fa:16:3e:ad:04:00 10.0.0.66"] [] [] [] true {"neutron: cidrs"= "10.0.0. 66/26", "neutron: device_ id"="", "neutron: port_name" ="", "neutron: project_ id"="0134078dd4 e54009bc64cac8d c0fa733" } "790b1d9c- 4926-4a95- 9451-528f17d5c1 da" {requested- chassis= ""}
ovn lsp column:
56c514b1-
stack@c3: ~/networking- ovn$ openstack subnet show 639659e1- d11e-445e- 8fc0-3f946e71da ee ------- ------- -----+- ------- ------- ------- ------- ------- --+ ------- ------- -----+- ------- ------- ------- ------- ------- --+ 5576-4cbf- 8f01-8873122c56 00 | 9bc64cac8dc0fa7 33 | ------- ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Field | Value |
+------
| cidr | 10.0.0.64/26 |
| enable_dhcp | True |
| gateway_ip | 10.0.0.65 |
| network_id | 69e1e4d1-
| project_id | 0134078dd4e5400
...
+------
stack@c3: ~/networking- ovn$ openstack subnet show e31f1af1- 0e88-4194- bd58-81d5b5a6cb a2 ------- ------- -----+- ------- ------- ------- ------- ------- --+ ------- ------- -----+- ------- ------- ------- ------- ------- --+ 5576-4cbf- 8f01-8873122c56 00 | ------- ------- -----+- ------- ------- ------- ------- ------- --+
+------
| Field | Value |
+------
| cidr | 10.0.0.192/26 |
| enable_dhcp | False |
| gateway_ip | 10.0.0.193 |
| network_id | 69e1e4d1-
...
+------
stack@c3: ~/networking- ovn$ openstack port show 790b1d9c- 4926-4a95- 9451-528f17d5c1 da ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ '10.0.0. 66', subnet_ id='639659e1- d11e-445e- 8fc0-3f946e71da ee' | 4926-4a95- 9451-528f17d5c1 da | 5576-4cbf- 8f01-8873122c56 00 | ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+
+------
| Field | Value |
+------
| device_owner | network:dhcp |
| fixed_ips | ip_address=
| id | 790b1d9c-
| network_id | 69e1e4d1-
...
+------
[2] ~/networking- ovn$ openstack port show 790b1d9c- 4926-4a95- 9451-528f17d5c1 da ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+ '10.0.0. 194', subnet_ id='e31f1af1- 0e88-4194- bd58-81d5b5a6cb a2' | '10.0.0. 66', subnet_ id='639659e1- d11e-445e- 8fc0-3f946e71da ee' | 4926-4a95- 9451-528f17d5c1 da | 5576-4cbf- 8f01-8873122c56 00 | ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- --+
stack@c3:
+------
| Field | Value |
+------
| admin_state_up | UP |
| device_owner | network:dhcp |
| fixed_ips | ip_address=
| | ip_address=
| id | 790b1d9c-
| network_id | 69e1e4d1-
...
+------