Ask Your Question
4

How to enable LBaaS on Havana (Controller+Compute) CentOS 6.5 ?

asked 2014-01-07 04:12:38 -0500

dbaxps gravatar image

updated 2014-06-11 11:59:34 -0500

smaffulli gravatar image

I followed

  1. http://openstack.redhat.com/Load_Bala...

  2. http://openstack.redhat.com/forum/dis...

I have updated haproxy.cfg just for one controller (test)

 [root@openstack2 haproxy(keystone_admin)]# cat haproxy.cfg

global

    daemon

defaults
    mode http
    maxconn 10000
    timeout connect 10s
    timeout client 10s
    timeout server 10s

frontend keystone-admin-vip
    bind 192.168.1.137:35357
    default_backend keystone-admin-api

frontend keystone-public-vip
    bind 192.168.1.137:5000
    default_backend keystone-public-api

frontend neutron-vip
    bind 192.168.1.137:9696
    default_backend neutron-api

frontend glance-vip
    bind 192.168.1.137:9191
    default_backend glance-api

frontend glance-registry-vip
    bind 192.168.1.137:9292
    default_backend glance-registry-api

frontend nova-ec2-vip
    bind 192.168.1.137:8773
    default_backend nova-ec2-api

frontend nova-compute-vip
    bind 192.168.1.137:8774
    default_backend nova-compute-api

frontend nova-metadata-vip
    bind 192.168.1.137:8775
    default_backend nova-metadata-api

frontend cinder-vip
    bind 192.168.1.137:8776
    default_backend cinder-api

backend keystone-admin-api
    balance roundrobin
    server openstack2 192.168.1.137:35357 check inter 10s

backend keystone-public-api
    balance roundrobin
    server openstack2 192.168.1.137:5000 check inter 10s

backend neutron-api
    balance roundrobin
    server openstack2 192.168.1.137:9696 check inter 10s

backend glance-api
    balance roundrobin
    server openstack2 192.168.1.137:9191 check inter 10s

backend glance-registry-api
    balance roundrobin
    server openstack2 192.168.1.137:9292 check inter 10s

backend nova-ec2-api
    balance roundrobin
    server openstack2 192.168.1.137:8773 check inter 10s

backend nova-compute-api
    balance roundrobin
    server openstack2 192.168.1.137:8774 check inter 10s

backend nova-metadata-api
    balance roundrobin
    server openstack2 192.168.1.137:8775 check inter 10s

backend cinder-api
    balance roundrobin
    server openstack2 192.168.1.137:8776 check inter 10s



[root@openstack2 haproxy(keystone_admin)]# service haproxy start

Starting haproxy: [ALERT] 006/135903 (12988) : Starting frontend keystone-admin-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend keystone-public-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend neutron-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend glance-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend glance-registry-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend nova-ec2-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend nova-compute-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend nova-metadata-vip: cannot bind socket

[ALERT] 006/135903 (12988) : Starting frontend cinder-vip: cannot bind socket

                                                           [FAILED]

On the other hand

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 35357
tcp        0      0 0.0.0.0:35357               0.0.0.0:*                   LISTEN      4189/python         

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 5000
tcp        0      0 0.0.0.0:5000                0.0.0.0:*                   LISTEN      4189/python         

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 9696
tcp        0      0 0.0.0.0:9696                0.0.0.0:*                   LISTEN      4037/python         

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 9191
tcp        0      0 0.0.0.0:9191                0.0.0.0:*                   LISTEN      4159/python         

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 9292
tcp        0      0 0.0.0.0:9292                0.0.0.0:*                   LISTEN      4147/python         

[root@openstack2 ~(keystone_admin)]# netstat -lnp | grep 8774
tcp        0      0 0.0.0.0:8774                0.0.0.0:*                   LISTEN      4523/python

Ports for ... (more)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2014-01-07 12:18:52 -0500

itlinux gravatar image

You need to make sure that your namespace is enabled before you can use LBaaS.

edit flag offensive delete link more

Comments

Could you please clearify what I am supposed to do to achieve my namespace enabled . All updates mentioned at http://openstack.redhat.com/forum/discussion/798/enabling-lbaas-in-havana-and-why-is-it-not-on-by-default#Item_4 are already done on CentOS 6.5, except one which I did. In general , I followed http://www.andrewklau.com/getting-started-with-multi-node-openstack-rdo-havana-gluster-backend-neutron/ and LBaaS section in particular

dbaxps gravatar imagedbaxps ( 2014-01-07 15:17:35 -0500 )edit
1

answered 2014-05-19 06:09:36 -0500

KK Patel gravatar image

Hi

You are getting this error because your define front-end ports are used by python. You need to configure different ports for front-ends and back-ends.

edit flag offensive delete link more
-1

answered 2014-01-08 06:10:16 -0500

dbaxps gravatar image

updated 2014-06-11 11:57:54 -0500

smaffulli gravatar image

Edit /etc/neutron/neutron.conf and add the following in the default section:

[DEFAULT]
service_plugins = neutron.services.loadbalancer.plugin.LoadBalancerPlugin

Already there (6.5)

Then edit the /etc/openstack-dashboard/local_settings file and search for enable_lb and set it to true:

OPENSTACK_NEUTRON_NETWORK = {
    'enable_lb': True
}

Done

# vi /etc/neutron/lbaas_agent.ini - already done no changes (6.5)

device_driver=neutron.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
interface_driver=neutron.agent.linux.interface.OVSInterfaceDriver
user_group=haproxy

Comment out the line in the service_providers section:

service_provider=LOADBALANCER:Haproxy:neutron.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default

Nothing to remove

service neutron-lbaas-agent start - already running , restarted

chkconfig neutron-lbaas-agent on  - skipped

service neutron-server restart  - done

service httpd restart  - done

Once LBaaS is configured and the agent is running,

Neutron API supposed to be used to create a load-balancer. This will load-balancer traffic to virtual machines.

Haproxy is supposed to run on the host which doesn't run Openstack services. In case when there are several controllers on landscape with or without keepalived.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-01-07 04:12:38 -0500

Seen: 1,294 times

Last updated: Jun 11 '14