← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1335023] [NEW] Neutron fails to create external network gateway when gateway's IP in different subnet with br-ex

 

Public bug reported:

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.

** Affects: neutron
     Importance: Undecided
         Status: New

** Description changed:

  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
+   --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. 
+ 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, in IP routing table of the
- router, no default gateway entry is added:
+ 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! 
+ 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.

-- 
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 OpenStack Neutron (virtual network service):
  New

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


Follow ups

References