yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #49535
[Bug 1571113] [NEW] SNAT interface not created for dvrha in some scenarios
Public bug reported:
branch: master
commit: 4e3a9c2b9c0ada6c2a471d24a20927aa8e8f5740
Depending on the order neutron router commands are given, the snat interface for a dvrha router on the dvr_snat agent might not get created.
look at following interaction:
--create a couple of network and subnets we will use (public and private)
neutron net-create public --router:external
neutron subnet-create public 192.168.201.0/24 --disable_dhcp
neutron net-create n1
neutron subnet-create n1 101.0.0.0/24 --name s1
-- now we create and attach router in particular order: first set
external gateway and then attach private subnet.
neutron router-create dvrha --distributed=True --ha=True
neutron router-gateway-set dvrha public
neutron router-interface-add dvrha s1
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.3"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.2"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.3"} |
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.4"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.1"} |
*** as you can see there are two interfaces on subnet 101/24: 101.0.0.3, and 101.0.0.1, one is the router interface the other is the snat interface
THIS IS CORRECT BEHAVIOR
*** next we change the order of the commands:
-- first clean up
neutron router-interface-delete dvrha s1
neutron router-gateway-clear dvrha
neutron router-delete dvrha
-- This time, we add the internal interface before setting the external
gateway. (reverse order of steps)
neutron router-create dvrha --distributed=True --ha=True
neutron router-interface-add dvrha s1
neutron router-gateway-set dvrha public
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.7"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.1"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.2"} |
+--------------------------------------------------------------------------------------+
*** this time the snat interface is NOT created.
-- we can fix this by toggling the internal subnet connection to the router:
neutron router-interface-delete dvrha s1
Removed interface from router dvrha.
neutron router-interface-add dvrha s1
Added interface c3cb410d-08a0-46a5-84fb-ec7bbead4eb3 to router dvrha.
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.7"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.1"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.5"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.2"} |
now the snat port is created (101.0.0.5)
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1571113
Title:
SNAT interface not created for dvrha in some scenarios
Status in neutron:
New
Bug description:
branch: master
commit: 4e3a9c2b9c0ada6c2a471d24a20927aa8e8f5740
Depending on the order neutron router commands are given, the snat interface for a dvrha router on the dvr_snat agent might not get created.
look at following interaction:
--create a couple of network and subnets we will use (public and private)
neutron net-create public --router:external
neutron subnet-create public 192.168.201.0/24 --disable_dhcp
neutron net-create n1
neutron subnet-create n1 101.0.0.0/24 --name s1
-- now we create and attach router in particular order: first set
external gateway and then attach private subnet.
neutron router-create dvrha --distributed=True --ha=True
neutron router-gateway-set dvrha public
neutron router-interface-add dvrha s1
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.3"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.2"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.3"} |
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.4"} |
| {"subnet_id": "782574e8-fabb-41da-a1a0-9817994ec0a5", "ip_address": "169.254.192.1"} |
*** as you can see there are two interfaces on subnet 101/24: 101.0.0.3, and 101.0.0.1, one is the router interface the other is the snat interface
THIS IS CORRECT BEHAVIOR
*** next we change the order of the commands:
-- first clean up
neutron router-interface-delete dvrha s1
neutron router-gateway-clear dvrha
neutron router-delete dvrha
-- This time, we add the internal interface before setting the
external gateway. (reverse order of steps)
neutron router-create dvrha --distributed=True --ha=True
neutron router-interface-add dvrha s1
neutron router-gateway-set dvrha public
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.7"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.1"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.2"} |
+--------------------------------------------------------------------------------------+
*** this time the snat interface is NOT created.
-- we can fix this by toggling the internal subnet connection to the router:
neutron router-interface-delete dvrha s1
Removed interface from router dvrha.
neutron router-interface-add dvrha s1
Added interface c3cb410d-08a0-46a5-84fb-ec7bbead4eb3 to router dvrha.
neutron router-port-list dvrha -c fixed_ips
+--------------------------------------------------------------------------------------+
| fixed_ips |
+--------------------------------------------------------------------------------------+
| {"subnet_id": "0173f29d-746d-45a1-ad10-16dde529eb34", "ip_address": "192.168.201.7"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.1"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.5"} |
| {"subnet_id": "b4a81968-8a08-4054-985f-e4e1cf687945", "ip_address": "101.0.0.1"} |
| {"subnet_id": "e9c7148e-04e5-4343-ac66-ac1651514b88", "ip_address": "169.254.192.2"} |
now the snat port is created (101.0.0.5)
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1571113/+subscriptions
Follow ups