← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1733609] Re: LBaaS namespace missing default route in IPv6 only network

 

I'm going to change the component to neutron-lbaas since this doesn't
seem to be caused by code in neutron proper.  Looking at the lbaas code
quickly, it looks like this file:

    drivers/haproxy/namespace_driver.py

Needs changes similar to what was done in:

   https://review.openstack.org/#/c/461887/8/neutron/agent/linux/dhcp.py

And there could be other places as well.

** Tags added: lbaas

** Project changed: neutron => octavia

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1733609

Title:
  LBaaS namespace missing default route in IPv6 only network

Status in octavia:
  New

Bug description:
  ​Description:
  When creating a LBaaS loadbalancer on an IPv6 only subnet (associated with a provider network with direct internet connectivity) the resulting namespace has no default route, even though the subnet has a gateway defined.

  When doing the same with an IPv4 only network the namespace gets an appropriate default route.
  When manually injecting the default route into the namespace it starts working immediately.

  Expected Result: IPv6 only subnets also get a default route, if the
  underlying subnet has one defined (gateway_ip).

  Reference: Bug#1709115 mentions the same problem. A fix for the qdhcp
  namespace was committed but the LBaaS side was never addressed or
  answered.

  Versions: ocata using Kolla from stable/ocata branch

  Example output (IP Addresses sanitized):

  Loadbalancer IPv4 (works as intended):
  ----------------------------------------
  (neutron) subnet-show internet-subnet01
  +-------------------+-----------------------------------------------------+
  | Field             | Value                                               |
  +-------------------+-----------------------------------------------------+
  | allocation_pools  | {"start": "XXX.XX.130.40", "end": "XXX.XX.130.240"} |
  | cidr              | XXX.XX.130.0/24                                     |
  | created_at        | 2017-11-03T08:17:14Z                                |
  | description       |                                                     |
  | dns_nameservers   | 8.8.4.4                                             |
  |                   | 8.8.8.8                                             |
  | enable_dhcp       | True                                                |
  | gateway_ip        | XXX.XX.130.1                                        |
  | host_routes       |                                                     |
  | id                | c68b03d8-8e6e-48ee-a7bc-fcd7e6d03f8a                |
  | ip_version        | 4                                                   |
  | ipv6_address_mode |                                                     |
  | ipv6_ra_mode      |                                                     |
  | name              | internet-subnet01                                   |
  | network_id        | 86ccc9d0-9495-4167-b515-68012781ded0                |
  | project_id        | 84fb831d59cc471cb686b27e56915c8a                    |
  | revision_number   | 3                                                   |
  | service_types     |                                                     |
  | subnetpool_id     |                                                     |
  | tags              |                                                     |
  | tenant_id         | 84fb831d59cc471cb686b27e56915c8a                    |
  | updated_at        | 2017-11-20T15:15:36Z                                |
  +-------------------+-----------------------------------------------------+

  (neutron) lbaas-loadbalancer-create --name test-lb internet-subnet01
  Created a new loadbalancer:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | admin_state_up      | True                                 |
  | description         |                                      |
  | id                  | f90eff87-de07-4fce-84ee-15ec6243a07b |
  | listeners           |                                      |
  | name                | test-lb                              |
  | operating_status    | OFFLINE                              |
  | pools               |                                      |
  | provider            | haproxy                              |
  | provisioning_status | PENDING_CREATE                       |
  | tenant_id           | 8af62d3343204fc1abfad779ebad815c     |
  | vip_address         | XXX.XX.130.41                        |
  | vip_port_id         | 98206b7b-603b-4064-b671-d15f5cf8c056 |
  | vip_subnet_id       | c68b03d8-8e6e-48ee-a7bc-fcd7e6d03f8a |
  +---------------------+--------------------------------------+

  (neutron) lbaas-listener-create --name test-lb-http --loadbalancer test-lb --protocol HTTP --protocol-port 80
  Created a new listener:
  +---------------------------+------------------------------------------------+
  | Field                     | Value                                          |
  +---------------------------+------------------------------------------------+
  | admin_state_up            | True                                           |
  | connection_limit          | -1                                             |
  | default_pool_id           |                                                |
  | default_tls_container_ref |                                                |
  | description               |                                                |
  | id                        | 2b2f5a5b-fd34-4090-ab0e-57c73efd6a24           |
  | loadbalancers             | {"id": "f90eff87-de07-4fce-84ee-15ec6243a07b"} |
  | name                      | test-lb-http                                   |
  | protocol                  | HTTP                                           |
  | protocol_port             | 80                                             |
  | sni_container_refs        |                                                |
  | tenant_id                 | 8af62d3343204fc1abfad779ebad815c               |
  +---------------------------+------------------------------------------------+

  root@tms-net01:~# ip netns exec qlbaas-f90eff87-de07-4fce-84ee-15ec6243a07b ip r
  default via XXX.XX.130.1 dev tap98206b7b-60
  XXX.XX.130.0/24 dev tap98206b7b-60  proto kernel  scope link  src XXX.XX.130.41
  ------------------------------------------

  IPv6 only LB (does not work)
  ------------------------------------------
  (neutron) subnet-show internet-6subnet01
  +-------------------+--------------------------------------------------------------------------------+
  | Field             | Value                                                                          |
  +-------------------+--------------------------------------------------------------------------------+
  | allocation_pools  | {"start": "XXXX:XXX:14c:2ca:1::1", "end": "XXXX:XXX:14c:2ca:1:ffff:ffff:ffff"} |
  | cidr              | XXXX:XXX:14c:2ca::/64                                                          |
  | created_at        | 2017-11-20T15:14:56Z                                                           |
  | description       |                                                                                |
  | dns_nameservers   | 2001:4860:4860::8888                                                           |
  |                   | 2001:4860:4860::8844                                                           |
  | enable_dhcp       | True                                                                           |
  | gateway_ip        | XXXX:XXX:14c:2ca::1                                                            |
  | host_routes       |                                                                                |
  | id                | b4a8a1a4-e830-46fb-b5f7-8cb05b5b4d13                                           |
  | ip_version        | 6                                                                              |
  | ipv6_address_mode | dhcpv6-stateful                                                                |
  | ipv6_ra_mode      | dhcpv6-stateful                                                                |
  | name              | internet-6subnet01                                                             |
  | network_id        | 86ccc9d0-9495-4167-b515-68012781ded0                                           |
  | project_id        | 84fb831d59cc471cb686b27e56915c8a                                               |
  | revision_number   | 3                                                                              |
  | service_types     |                                                                                |
  | subnetpool_id     |                                                                                |
  | tags              |                                                                                |
  | tenant_id         | 84fb831d59cc471cb686b27e56915c8a                                               |
  | updated_at        | 2017-11-20T15:20:18Z                                                           |
  +-------------------+--------------------------------------------------------------------------------+

  (neutron) lbaas-loadbalancer-create --name test-6lb internet-6subnet01
  Created a new loadbalancer:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | admin_state_up      | True                                 |
  | description         |                                      |
  | id                  | 446d3ac1-cff2-4a65-943e-d8789492c28c |
  | listeners           |                                      |
  | name                | test-6lb                             |
  | operating_status    | OFFLINE                              |
  | pools               |                                      |
  | provider            | haproxy                              |
  | provisioning_status | PENDING_CREATE                       |
  | tenant_id           | 8af62d3343204fc1abfad779ebad815c     |
  | vip_address         | XXXX:XXX:14c:2ca:1::4                |
  | vip_port_id         | 70192af1-fcf8-4bab-a12d-88a1bd5fd121 |
  | vip_subnet_id       | b4a8a1a4-e830-46fb-b5f7-8cb05b5b4d13 |
  +---------------------+--------------------------------------+

  (neutron) lbaas-listener-create --name test-6lb-http --loadbalancer test-6lb --protocol HTTP --protocol-port 80
  Created a new listener:
  +---------------------------+------------------------------------------------+
  | Field                     | Value                                          |
  +---------------------------+------------------------------------------------+
  | admin_state_up            | True                                           |
  | connection_limit          | -1                                             |
  | default_pool_id           |                                                |
  | default_tls_container_ref |                                                |
  | description               |                                                |
  | id                        | 9bf78956-2af7-4d3f-b73e-1e72ea7fef8f           |
  | loadbalancers             | {"id": "446d3ac1-cff2-4a65-943e-d8789492c28c"} |
  | name                      | test-6lb-http                                  |
  | protocol                  | HTTP                                           |
  | protocol_port             | 80                                             |
  | sni_container_refs        |                                                |
  | tenant_id                 | 8af62d3343204fc1abfad779ebad815c               |
  +---------------------------+------------------------------------------------+

  ###
  ### No default route in the qlbaas namespace:
  ###
  root@tms-net01:~# ip netns exec qlbaas-446d3ac1-cff2-4a65-943e-d8789492c28c ip -6 r
  XXXX:XXX:14c:2ca::/64 dev tap70192af1-fc  proto kernel  metric 256  pref medium
  fe80::/64 dev tap70192af1-fc  proto kernel  metric 256  pref medium

  ###
  ### When manually adding the route, the LB starts to be reachable from the outside:
  ###
  root@tms-net01:~# ip netns exec qlbaas-446d3ac1-cff2-4a65-943e-d8789492c28c ip -6 r add default via XXXX:XXX:14c:2ca::1 dev tap70192af1-fc

  root@dropship:~# ping6 XXXX:XXX:14c:2ca:1::4
  PING XXXX:XXX:14c:2ca:1::4(XXXX:XXX:14c:2ca:1::4) 56 data bytes
  64 bytes from XXXX:XXX:14c:2ca:1::4: icmp_seq=53 ttl=56 time=4.87 ms
  64 bytes from XXXX:XXX:14c:2ca:1::4: icmp_seq=54 ttl=56 time=3.59 ms
  ----------------------------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/octavia/+bug/1733609/+subscriptions


References