Reviewed: https://review.openstack.org/233287 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b6126bc0f17f348ff6303b9bd6041cb018479ef9 Submitter: Jenkins Branch: master
commit b6126bc0f17f348ff6303b9bd6041cb018479ef9 Author: Sreekumar S <[email protected]> Date: Sat Oct 10 03:18:00 2015 +0530 Fix for adding gateway with IP outside subnet Currently 'force_gateway_on_subnet' configuration is set to True by default and enforces the subnet on to the gateway. With this fix 'force_gateway_on_subnet' can be changed to False, and gateway outside the subnet can be added. Before adding the default route, a route to the gateway IP is added. This applies to both external and internal networks. This configuration option is deprecated, and should be removed in a future release. It should always allow gateway outside the subnet. This is done as a separate patch https://review.openstack.org/#/c/277303/ Change-Id: I3a942cf98d263681802729cf09527f06c80fab2b Closes-Bug: #1335023 Closes-Bug: #1398768 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1335023 Title: Neutron fails to create external network gateway when gateway's IP in different subnet with br-ex Status in neutron: Fix Released Bug description: Hi guys, I encountered a problem with neutron when trying to create external network with gateway in different subnet: neutron subnet-create ext-net --name ext-subnet \ --allocation-pool start=46.105.252.216,end=46.105.252.219\ --disable-dhcp --gateway 176.31.105.254 46.105.252.0/24 The external network has gateway in different subnet: 46.105.252.216/24 and 176.31.105.254 I need something like this due to the router configuration in DC. The problem is neutron show no error, and on dashboard, the ext-net also shows its gateway 176.31.105.254. However, packets are not routed because in IP routing table of the router, no default gateway entry is added: sudo ip netns exec qrouter-f918cbb7-dc0c-4713-a6f5-3c66b46e12cf route -n Destination Gateway Genmask Flags Metric Ref Use Iface 46.105.252.0 0.0.0.0 255.255.255.0 U 0 0 0 qg-0103d6fa-31 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 qr-343ab2cb-f5 I can work around by manually adding two line in routing table: Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 176.31.105.254 0.0.0.0 UG 0 0 0 qg-0103d6fa-31 46.105.252.0 0.0.0.0 255.255.255.0 U 0 0 0 qg-0103d6fa-31 176.31.105.254 0.0.0.0 255.255.255.255 UH 0 0 0 qg-0103d6fa-31 192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 qr-343ab2cb-f5 Then it worked fine! I believe this is a bug, due to adding gateway with different subnet in routing table will be rejected. In this case, we need to add this line first before adding gateway: 176.31.105.254 0.0.0.0 255.255.255.255 UH 0 0 0 qg-0103d6fa-31 So either we need to show users an error "not allow to add gateway in different subnet", or we should support adding gateway properly. To manage notifications about this bug go to: https://bugs.launchpad.net/neutron/+bug/1335023/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

