How to implement lvs driver for Juno

asked 2015-01-17 08:20:25 -0500

adinovic gravatar image

Hi, i want to loadbalance UDP traffic (DNS), but the default lbaas in openstack using haproxy which doesn't support UDP loadbalance, and then i saw in lbaas requirement ( https://wiki.openstack.org/wiki/Neutron/LBaaS/requirements (https://wiki.openstack.org/wiki/Neutr...) ) that UDP supported by implementing lvs driver, so i'm trying to implement lvsdriver from the wiki https://wiki.openstack.org/wiki/Neutron/LBaaS/LVSDriver (https://wiki.openstack.org/wiki/Neutr...) . Unfortunately there isn't detailed implementation step from that wiki. Before developing the UDP lb, i just want to make sure the driver also work for HTTP/TCP. Here what i've done :

  • i'm using devstack (Juno), cloning neutron and merge the code from https://review.openstack.org/#/c/73962/ (to add routing service insertion) and https://review.openstack.org/#/c/67405/ (to add lvs driver)
  • re-stack the devstack
  • copied the /opt/stack/neutron/neutron/services/loadbalancer/drivers/lvs to /etc/neutron/services/loadbalancer/lvs/
  • edit /etc/neutron/neutron.conf and add following line :

    service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.lvs.plugin_driver.LVSOnHostPluginDriver:default

  • copied /etc/neutron/services/loadbalancer/haproxy/lbaas_agent.ini to /etc/neutron/lbaas_agent.ini and change haproxy to lvs like this :

    device_driver = neutron.services.loadbalancer.drivers.lvs.agent.LBaaSL3AgentDriver

  • i've contacted Iwamoto Toshihiro as one owner of the code, he said that instead of using l3-agent, so i should run l3-lbaas-agent (from the code), so i run killed l3-agent, as well lbaas-agent, restarting neutron-server and run

    neutron-lbaas-l3-agent --config-file /etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini --config-file=/etc/neutron/lbaas_agent.ini

however on lbaas-l3-agent it showed

2015-01-17 18:03:30.839 DEBUG neutron.openstack.common.lockutils [req-3dd0e421-d047-4add-a4ad-a24127646c5f None None] Semaphore / lock released "_rpc_loop" from (pid=19704) inner /opt/stack/neutron/neutron/openstack/common/lockutils.py:252 2015-01-17 18:03:31.838 DEBUG neutron.openstack.common.lockutils [req-3dd0e421-d047-4add-a4ad-a24127646c5f None None] Got semaphore "l3-agent" from (pid=19704) lock /opt/stack/neutron/neutron/openstack/common/lockutils.py:168

  • create topology like below, instance from vip network could access outside network, instances from pool subnet can access any network but outside network (however instances can reach floating IP of router1).

https://wiki.openstack.org/w/images/6/6f/LVS_LBaaS_Diagram2.jpg (image description)

  • and then i try to create lb-vip (protocol HTTP) for pool instances, i encountered problem :

stack@ubuntu1404:~$ neutron lb-vip-create --name http-vip --protocol HTTP --protocol-port 80 --subnet-id vip-subnet http-pool Request Failed: internal server error while processing your request.

When i check the vip list, it's exist, but instances from pool network couldn't reach that lb vip.

stack@ubuntu1404:~$ neutron lb-vip-list

+--------------------------------------+----------+---------------+----------+----------------+----------------+ | id | name | address | protocol | admin_state_up | status | +--------------------------------------+----------+---------------+----------+----------------+----------------+ | c4759213-f543-47d0-894c-c8622dc4f660 | http-vip | 192.168.2.101 | HTTP | True | PENDING_CREATE | +--------------------------------------+----------+---------------+----------+----------------+----------------+

i don't know if there's mistake from what i've been done above, perhaps anyone can guide how to implement lvsdriver properly? thanks

edit retag flag offensive close merge delete

Comments

I would like to find out the solution of UDP load balancing on OpenStack. Did you get success using LVS driver of LBaaS?

Taurus Cheung gravatar imageTaurus Cheung ( 2016-07-06 04:04:32 -0500 )edit