[Openstack] Install/Enable Quantum lbass (load balancer) feature?

Eugene Nikanorov enikanorov at mirantis.com
Fri Aug 30 05:51:30 UTC 2013


I've always tested/worked with single node setup that devstack provides.
The host is Ubuntu 12.04, works just fine.

To setup lbaas in devstack. in addition to other neutron-related lines in
localrc file you need to add the following:
service_enable q-lbaas

Thanks,
Eugene.


On Fri, Aug 30, 2013 at 8:21 AM, Jake G. <dj_dark_junglist at yahoo.com> wrote:

> Hi,
>
> I am not sure about Ubuntu. I was never able to get openstack working on
> Ubuntu so I gave up, but this is the process I used to set up LBaas on
> CentOS
> Please replace commands with Ubuntu style commands
>
>
> ■ Add Quantum LBaas service to Openstack RDO
>
> 1. install haproxy if it not already installed
> # yum install haproxy -y
> # reboot
>
> 2. Make sure you have the modified kernel that supports namespaces. (not
> necessary on Ubuntu. Already supports namespaces)
> # uname -r
> Should look something like this. Your version may be different ->
> 2.6.32-358.114.1.openstack.el6.x86_64
>
> 3. Add following line in /etc/quantum/quantum.conf on your quantum-server
> host and restart quantum-server
> # vi /etc/quantum/quantum.conf
> ---------------------------------
> service_plugins =
> quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin
> ---------------------------------
> # /etc/init.d/quantum-server restart
>
> 4. Insert the following line in /etc/openstack-dashboard/local_settings on
> horizon host, and restart httpd. This enables LBaaS operations on Dashboard
> WebUI
> # vi /etc/openstack-dashboard/local_settings
> ---------------------------------
>
> OPENSTACK_QUANTUM_NETWORK = {
> 'enable_lb': True
> }
> ---------------------------------
> # service httpd restart
>
> 5. Update the following lines in /etc/quantum/lbaas_agent.ini , then
> restart quantum-lbaas-agent service
> # vi /etc/quantum/lbaas_agent.ini
> ---------------------------------
> ovs_use_veth = True
> use_namespaces = True
> interface_driver = quantum.agent.linux.interface.OVSInterfaceDriver
> device_driver =
> quantum.plugins.services.agent_loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
> user_group = haproxy
> ---------------------------------
> # /etc/init.d/quantum-lbaas-agent restart
>
>
> This process worked for me, you could give it a try.
>
> Best,
> Jake
>
>
>
>   ------------------------------
>  *From:* Mahardhika <mahardika.gilang at andalabs.com>
> *To:* Jake G. <dj_dark_junglist at yahoo.com>; Eugene Nikanorov <
> enikanorov at mirantis.com>; "openstack at lists.openstack.org" <
> openstack at lists.openstack.org>
> *Sent:* Friday, August 30, 2013 1:01 PM
>
> *Subject:* Re: [Openstack] Install/Enable Quantum lbass (load balancer)
> feature?
>
>  Does lbass can get install on ubuntu based system? how to check it?
>
> On 8/12/2013 4:16 PM, Jake G. wrote:
>
>  Ok i started from scratch and now everything is working just fine. Thank
> you for all your help.
>  In the end I believe it was because I did not have haproxy installed.
>
>
>
>   ------------------------------
>  *From:* Eugene Nikanorov <enikanorov at mirantis.com><enikanorov at mirantis.com>
> *To:* Jake G. <dj_dark_junglist at yahoo.com> <dj_dark_junglist at yahoo.com>
> *Cc:* "openstack at lists.openstack.org" <openstack at lists.openstack.org>
> <openstack at lists.openstack.org> <openstack at lists.openstack.org>
> *Sent:* Friday, August 9, 2013 7:50 PM
> *Subject:* Re: [Openstack] Install/Enable Quantum lbass (load balancer)
> feature?
>
>  use_namespaces has no effect, lbaas agent in grizzly always relies on
> namespace support.
>
>  Could you execute the failing command manually?
> That needs to be done after you create a vip for the pool.
> The command should look like this:
> sudo quantum-rootwrap /etc/quantum/rootwrap.conf ip netns exec
> qlbaas-e10951cd-4cca-4ba4-acc0-0ccde6817029 haproxy -f /var
> /lib/quantum/lbaas/e10951cd-4cca-4ba4-acc0-0ccde6817029/conf -p
> /var/lib/quantum/lbaas/e10951cd-4cca-4ba4-acc0-0ccde6817029/pid
>
>  <e10951cd-4cca-4ba4-acc0-0ccde6817029> should be replaced with actual
> pool_id
>  Could you also verify that path and file /lib/quantum/lbaas/e10951cd-
> 4cca-4ba4-acc0-0ccde6817029/conf exist?
>
>  Thanks,
> Eugene.
>
>
> On Fri, Aug 9, 2013 at 12:39 PM, Jake G. <dj_dark_junglist at yahoo.com>wrote:
>
>   Yes this is my Kernel>  2.6.32-358.114.1.openstack.el6.x86_64
> and I enable:
>
>  use_namespaces = True
>  ovs_use_veth = True
>
>  in /etc/quantum/dhcp_agent.ini and etc/quantum/l3_agent.ini
>
>
>
>   ------------------------------
>  *From:* Eugene Nikanorov <enikanorov at mirantis.com>
> *To:* Jake G. <dj_dark_junglist at yahoo.com>
> *Cc:* "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>  *Sent:* Friday, August 9, 2013 5:33 PM
>
> *Subject:* Re: [Openstack] Install/Enable Quantum lbass (load balancer)
> feature?
>
>  Jake, haproxy.cfg is created by lbaas agent when you deploy an instance.
> Are you sure your host os has namespace support?
>
>  Eugene.
>
>
>  On Fri, Aug 9, 2013 at 12:30 PM, Jake G. <dj_dark_junglist at yahoo.com>wrote:
>
>  Good call!
>  Looks like i did but the service wont start. Do you have a sample
> haproxy.cfg file that will work with Openstack?
>
>  Thank you
>
>   ------------------------------
>  *From:* Eugene Nikanorov <enikanorov at mirantis.com>
> *To:* Jake G. <dj_dark_junglist at yahoo.com>
> *Cc:* "openstack at lists.openstack.org" <openstack at lists.openstack.org>
>  *Sent:* Friday, August 9, 2013 3:08 PM
>
> *Subject:* Re: [Openstack] Install/Enable Quantum lbass (load balancer)
> feature?
>
>  Do you have haproxy package installed on your host?
>
>
> On Fri, Aug 9, 2013 at 9:41 AM, Jake G. <dj_dark_junglist at yahoo.com>wrote:
>
>   I have enabled LBaas on my openstack, but after adding a pool, vip,
> members, and monitor successfully I am still unable to get load balancing
> working.
>  I found this blog to help me so far
> http://kimizhang.wordpress.com/2013/08/08/openstack-grizzly-quantum-advanced-features-2/
>
>  When I run # ps -ef | grep haproxy I dont get much:
> root 27508 2718 0 14:16 pts/1 00:00:00 grep haproxy
>
>  My logs show an issue with haproxy:
>
>  RuntimeError:
> Command: ['sudo', 'quantum-rootwrap', '/etc/quantum/rootwrap.conf', 'ip',
> 'netns', 'exec', 'qlbaas-e10951cd-4cca-4ba4-acc0-0ccde6817029', 'haproxy',
> '-f', '/var
> /lib/quantum/lbaas/e10951cd-4cca-4ba4-acc0-0ccde6817029/conf', '-p',
> '/var/lib/quantum/lbaas/e10951cd-4cca-4ba4-acc0-0ccde6817029/pid']
> Exit code: 255
> Stdout: ''
>  Stderr: 'exec of haproxy failed: No such file or directory\n'
> 2013-08-09 14:16:17    ERROR
> [quantum.plugins.services.agent_loadbalancer.agent.manager] Unable to
> refresh device for pool: e10951cd-4cca-4ba4-acc0-0ccde6817029
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.6/site-packages/quantum/plugins/services/agent_loadbalancer/agent/manager.py",
> line 189, in refresh_device
>     self.driver.create(logical_config)
>   File
> "/usr/lib/python2.6/site-packages/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/namespace_driver.py",
> line 48, in create
>     self._spawn(logical_config)
>   File
> "/usr/lib/python2.6/site-packages/quantum/plugins/services/agent_loadbalancer/drivers/haproxy/namespace_driver.py",
> line 70, in _spawn
>     ns.netns.execute(cmd)
>   File "/usr/lib/python2.6/site-packages/quantum/agent/linux/ip_lib.py",
> line 414, in execute
>     check_exit_code=check_exit_code)
>   File "/usr/lib/python2.6/site-packages/quantum/agent/linux/utils.py",
> line 61, in execute
>     raise RuntimeError(m)
>
>  Any ideas?
>
>      ------------------------------
>  *From:* Eugene Nikanorov <enikanorov at mirantis.com>
> *To:* Jake G. <dj_dark_junglist at yahoo.com>
> *Cc:* "openstack at lists.openstack.org" <openstack at lists.openstack.org>
> *Sent:* Thursday, August 8, 2013 7:04 PM
> *Subject:* Re: [Openstack] Install/Enable Quantum lbass (load balancer)
> feature?
>
>  Hi Jake,
>
>  Regarding lbaas in grizzly working on RHEL/Centos - it may be
> problematic as host operation system must support network namespaces.
> If you do have support for network namespaces then you need to do the
> following steps to setup lbaas service in quantum:
>
>  1) specify lbaas plugin in quantum.conf:
> service_plugins= lbaas_plugin_classpath.
> check quantum/plugins/services/agent_loadbalancer/plugin.py for correct
> path as currently the name and path has changed.
>
>  2) to enable lbaas service in horizon you need to do the following:
> add the following piece of code
> to horizon/openstack_dashboard/local/local_settings.py :
>
>  OPENSTACK_QUANTUM_NETWORK = {
>     'enable_lb': False
> }
>
>  3) start quantum-lbaas-agent on the host providing quantum.conf and
> lbaas-agent.ini. lbaas-agent.ini should reflect core plugin configuration
> (should have proper interface driver)
>
>  Note that if host os has no namespace support, all of above will work
> (e.g. REST API will be functional), but you would not be able to deploy
> loadbalancer as lbaas agent can only work with namespaces.
>
>  Thanks,
> Eugene.
>
>
> On Thu, Aug 8, 2013 at 1:14 PM, Jake G. <dj_dark_junglist at yahoo.com>wrote:
>
>  Hi all!
> How can we install/enable the Quantum-lbaas (load balancer) feature for
> Openstack Grizzly? I dont see any docs for RHEL/CentOS specific installs.
> I used RDO to deploy Openstack on a single node.
>
>  Thank you! Jake
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
>
> --
> Regards,
> Mahardhika Gilang
>
> *PT. Andalabs Technology *
> Gedung Gravira
> Jl. Cideng Barat no. 54
> Jakarta Pusat 10150
>
> HP : 0852 139 55861
> Email : mahardika.gilang at andalabs.com
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130830/51728791/attachment.html>


More information about the Openstack mailing list