Openstack LBaaS is not able to access the external network.

Solution Unverified - Updated -

Environment

  • Red Hat OpenStack Platform 10
  • LBaaS v2

Issue

  • Openstack LBaaS is not able to access the external network.
  • 3 party function is replacing the vRoter function of OSP or Env is not usning vRouter in openstack.
  • VM can ping out to external environment.
  • Between VM and lbaas networking is normal status.

Resolution

Set gateway to subnet for set gateway to loadbalancer.

[stack@instack ~]$ openstack subnet set --gateway 10.111.111.1 test-1
[stack@instack ~]$ openstack subnet show test-1
+-------------------+--------------------------------------+
| Field             | Value                                |
+-------------------+--------------------------------------+
| allocation_pools  | 10.111.111.2-10.111.111.254          |
| cidr              | 10.111.111.0/24                      |
| created_at        | 2019-05-20T07:43:51Z                 |
| description       |                                      |
| dns_nameservers   |                                      |
| enable_dhcp       | True                                 |
| gateway_ip        | 10.111.111.1                         |
| host_routes       |                                      |
| id                | d940b09e-0a3e-4c46-90c9-253d4fb4e2d4 |
| ip_version        | 4                                    |
| ipv6_address_mode | None                                 |
| ipv6_ra_mode      | None                                 |
| name              | test-1                               |
| network_id        | c54a869f-d0e3-4c82-a19e-ace993bbd02a |
| project_id        | 48cb9690b7554cfea15e21cd45ccb351     |
| project_id        | 48cb9690b7554cfea15e21cd45ccb351     |
| revision_number   | 4                                    |
| service_types     | []                                   |
| subnetpool_id     | None                                 |
| updated_at        | 2019-05-21T03:57:22Z                 |
+-------------------+--------------------------------------+

Root Cause

Loadbalancer needs to have gateway to communicate with the external network.

Diagnostic Steps

  1. Check the loadbalancer.

    [root@overcloud-controller-0 ~]# neutron lbaas-loadbalancer-list
    +--------------------------------------+------------+---------------+---------------------+----------+
    | id                                   | name       | vip_address   | provisioning_status | provider |
    +--------------------------------------+------------+---------------+---------------------+----------+
    | 483e3a79-ab8c-4a85-83d3-bea3e204f3b7 | test-lbaas | 10.111.111.10 | ACTIVE              | haproxy  |
    +--------------------------------------+------------+---------------+---------------------+----------+
    
  2. Check the controller node that loadbalancer is activeing.

    [stack@instack ~]$ neutron lbaas-agent-hosting-loadbalancer 483e3a79-ab8c-4a85-83d3-bea3e204f3b7
    +--------------------------------------+------------------------+----------------+-------+
    | id                                   | host                   | admin_state_up | alive |
    +--------------------------------------+------------------------+----------------+-------+
    | e3fbde5c-a08d-460a-a344-ebecc4844680 | overcloud-controller-0 | True           | :-)   |
    +--------------------------------------+------------------------+----------------+-------+
    
  3. Move to controller node that is activate loadbalancer

    [root@overcloud-controller-0 ~]# 
    
  4. Access Loadbalancer namespace

    [root@overcloud-controller-0 ~]# ip netns exec qlbaas-483e3a79-ab8c-4a85-83d3-bea3e204f3b7 bash
    [root@overcloud-controller-0 ~]# netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
    10.111.111.0    0.0.0.0         255.255.255.0   U         0 0          0 tapf3868c9c-c7
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.