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 ( ( ) that UDP supported by implementing lvs driver, so i'm trying to implement lvsdriver from the wiki ( . 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 (to add routing service insertion) and (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 :

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

    device_driver =

  • 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/ 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/

  • 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). (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 | | 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


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