Adding the following exception: diff --git a/networking_l2gw/db/l2gateway/l2gateway_db.py b/networking_l2gw/db/l2gateway/l2gateway_db.py index 806647b..227d5d5 100644 --- a/networking_l2gw/db/l2gateway/l2gateway_db.py +++ b/networking_l2gw/db/l2gateway/l2gateway_db.py @@ -277,6 +277,7 @@ class L2GatewayMixin(l2gateway.L2GatewayPluginBase, def create_l2_gateway_connection(self, context, l2_gateway_connection): """Create l2 gateway connection.""" + raise Exception("GET OUT OF SYNC!") gw_connection = l2_gateway_connection[self.connection_resource] l2_gw_id = gw_connection.get('l2_gateway_id') network_id = gw_connection.get('network_id') This will trigger the inconsistency between the DB and the OVSDB of the managed switch: centos@devstack ~]$ ./l2gw_create.txt neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Request Failed: internal server error while processing your request. Neutron server returns request_ids: ['req-79016e1e-9c9a-44f8-9186-ebc5ceda8039'] neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. Request Failed: internal server error while processing your request. Neutron server returns request_ids: ['req-fef00891-1477-462a-be44-df068a5989ab'] [centos@devstack ~]$ cat l2gw_create.txt neutron l2-gateway-connection-create gw1 private --default-segmentation-id 200 neutron l2-gateway-connection-create gw1 private2 --default-segmentation-id 300 [centos@devstack ~]$ neutron l2-gateway-connection-list neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. [centos@devstack ~]$ However, the OVSDB has been modified adding new vlan bindings: [centos@hwvtep ~]$ sudo ovsdb-client dump hardware_vtep [35/8267] ACL table _uuid acl_entries acl_fault_status acl_name ----- ----------- ---------------- -------- ACL_entry table _uuid acle_fault_status action dest_ip dest_mac dest_mask dest_port_max dest_port_min direction ethertype icmp_code icmp_type protocol sequence source_ip source_mac source_mask source_port_max source_port_m in tcp_flags tcp_flags_mask ----- ----------------- ------ ------- -------- --------- ------------- ------------- --------- --------- --------- --------- -------- -------- --------- ---------- ----------- --------------- ------------- -- --------- -------------- Arp_Sources_Local table _uuid locator src_mac ----- ------- ------- Arp_Sources_Remote table _uuid locator src_mac ----- ------- ------- Global table _uuid managers switches ------------------------------------ -------------------------------------- -------------------------------------- 0d30fbd3-e040-47c0-9841-c011baa554c3 [6f32515f-59bf-44ae-b12a-43255d2019b9] [1a412a01-943e-47fb-9779-d631d4df4e2a] Logical_Binding_Stats table _uuid bytes_from_local bytes_to_local packets_from_local packets_to_local ----- ---------------- -------------- ------------------ ---------------- Logical_Router table LR_fault_status _uuid acl_binding description name static_routes switch_binding --------------- ----- ----------- ----------- ---- ------------- -------------- Logical_Switch table _uuid description name tunnel_key ------------------------------------ ----------- -------------------------------------- ---------- f5760373-6242-4b9d-ab70-e09b3eb7ad92 private "0f8f9ccd-a85a-4d7e-b71e-1df65b90f18e" 49 adc60ecd-3c46-477e-ad47-f6cedb382234 "private2" "d93f5884-8297-4039-8d45-c0c5a3ac6b31" 91 3c0adec7-ce80-446d-8226-02b34e3408c0 "private3" "0c4ffcc8-d13c-4333-9089-e0f93d24b051" 6 Manager table _uuid inactivity_probe is_connected max_backoff other_config status target ------------------------------------ ---------------- ------------ ----------- ------------ ----------------------------------------- ----------------------- 6f32515f-59bf-44ae-b12a-43255d2019b9 [] true [] {} {sec_since_connect="2851601", state=IDLE} "tcp:192.168.0.13:6632" Mcast_Macs_Local table MAC _uuid ipaddr locator_set logical_switch --- ----- ------ ----------- -------------- Mcast_Macs_Remote table MAC _uuid ipaddr locator_set logical_switch --- ----- ------ ----------- -------------- Physical_Locator table _uuid dst_ip encapsulation_type ------------------------------------ ------------- ------------------ 68b216f4-cc78-40fe-9b00-cc1a6b1c99be "192.168.0.7" "vxlan_over_ipv4" Physical_Locator_Set table _uuid locators ----- -------- Physical_Port table _uuid acl_bindings description name port_fault_status vlan_bindings vlan_stats ------------------------------------ ------------ ----------- ------ ----------------- ------------------------------------------------------------------------------------ ---------- 77c6c08f-1520-4698-8808-abd4f7eeb61b {} "" "eth1" [] {200=f5760373-6242-4b9d-ab70-e09b3eb7ad92, 300=adc60ecd-3c46-477e-ad47-f6cedb382234} {} d53ee688-e763-4165-acc4-134acf447f50 {} "" "eth2" [] {200=f5760373-6242-4b9d-ab70-e09b3eb7ad92, 300=adc60ecd-3c46-477e-ad47-f6cedb382234} {} Physical_Switch table _uuid description management_ips name ports switch_fault_status tunnel_ips tunnels ------------------------------------ ----------- -------------- ------ ---------------------------------------------------------------------------- ------------------- ---------------- ------- 1a412a01-943e-47fb-9779-d631d4df4e2a "" [] hwvtep [77c6c08f-1520-4698-8808-abd4f7eeb61b, d53ee688-e763-4165-acc4-134acf447f50] [] ["192.168.0.13"] [] Tunnel table _uuid bfd_config_local bfd_config_remote bfd_params bfd_status local remote ----- ---------------- ----------------- ---------- ---------- ----- ------ Ucast_Macs_Local table MAC _uuid ipaddr locator logical_switch --- ----- ------ ------- -------------- Ucast_Macs_Remote table MAC _uuid ipaddr locator logical_switch ------------------- ------------------------------------ ------------------- ------------------------------------ ------------------------------------ "fa:16:3e:11:19:88" 49940a2f-978e-4fa5-95e0-a7334a0744ca "fd16:d881:b9f4::1" 68b216f4-cc78-40fe-9b00-cc1a6b1c99be f5760373-6242-4b9d-ab70-e09b3eb7ad92 "fa:16:3e:38:9c:0a" 66d9595c-1849-47ce-914b-0fef76eb364d "10.0.0.2" 68b216f4-cc78-40fe-9b00-cc1a6b1c99be f5760373-6242-4b9d-ab70-e09b3eb7ad92 "fa:16:3e:3b:86:25" a72a4722-822f-46b1-97c7-66c69dfd13d3 "10.0.0.1" 68b216f4-cc78-40fe-9b00-cc1a6b1c99be f5760373-6242-4b9d-ab70-e09b3eb7ad92 "fa:16:3e:45:3b:52" 944255de-a42b-4ca7-8085-7fd7c1586d4f "192.168.100.2" 68b216f4-cc78-40fe-9b00-cc1a6b1c99be adc60ecd-3c46-477e-ad47-f6cedb382234 [centos@hwvtep ~]$