Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Enabling lbaas through Octavia in Devstack Fails

Hi,

I have Openstack setup where controller, compute and network(neutron) running in single physical machine through devstack(git branch: master). Enabling lbaas through Octavia plugin in devstack keeps provision status as "PENDING_CREATE" on lb creation for long time. Could find the below error message from /opt/stack/logs/q-lbaasv2.log

ERROR neutron_lbaas.agent.agent_manager [-] Unable to retrieve ready devices

Lbaas Options added in [local.conf] of devstack setup

Followed the below link and did the below config

https://wiki.openstack.org/wiki/Neutron/LBaaS/HowToRun

I would like to confirm whether the way I enabled lbaas in devstack is correct. Please throw some light on this. I have added the logs neutron & lbaas config too here.

[NEUTRON CONFIG]
Q_USE_SECGROUP=True
FLOATING_RANGE=172.30.5.0/24
FIXED_RANGE=10.0.0.0/24
Q_FLOATING_ALLOCATION_POOL=start=172.30.5.250,end=172.30.5.254
PUBLIC_NETWORK_GATEWAY="172.30.5.1"
Q_L3_ENABLED=True
PUBLIC_INTERFACE=em1
Q_USE_PROVIDERNET_FOR_PUBLIC=True
OVS_PHYSICAL_BRIDGE=br-ex
PUBLIC_BRIDGE=br-ex
OVS_BRIDGE_MAPPINGS=public:br-ex

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-meta
enable_service q-l3

enable_plugin neutron-lbaas http://git.openstack.org/openstack/neutron-lbaas
enable_plugin octavia http://github.com/openstack/octavia.git
ENABLED_SERVICES+=,q-lbaasv2
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api

Below are debug info for lb creation & error output

>$:~/Openstack/devstack$ neutron --debug lbaas-loadbalancer-create --name lb2 private-subnet
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://172.30.5.21:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG: keystoneclient.session RESP: [200] content-length: 337 vary: X-Auth-Token keep-alive: timeout=5, max=100 server: Apache/2.4.7 (Ubuntu) connection: Keep-Alive date: Wed, 14 Oct 2015 19:12:21 GMT content-type: application/json x-openstack-request-id: req-832927f6-b9b4-4e35-a157-5ede404a690f
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://172.30.5.21:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG: stevedore.extension found extension EntryPoint.parse('table = cliff.formatters.table:TableFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = cliff.formatters.json_format:JSONFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('shell = cliff.formatters.shell:ShellFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('value = cliff.formatters.value:ValueFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = cliff.formatters.yaml_format:YAMLFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('yaml = clifftablib.formatters:YamlFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('json = clifftablib.formatters:JsonFormatter')
DEBUG: stevedore.extension found extension EntryPoint.parse('html = clifftablib.formatters:HtmlFormatter')
DEBUG: neutronclient.neutron.v2_0.lb.v2.loadbalancer.CreateLoadBalancer get_data(Namespace(admin_state=True, columns=[], description=None, formatter='table', max_width=0, name=u'lb2', noindent=False, prefix='', provider=None, request_format='json', tenant_id=None, variables=[], vip_address=None, vip_subnet=u'private-subnet'))
DEBUG: keystoneclient.auth.identity.v2 Making authentication request to http://172.30.5.21:5000/v2.0/tokens
DEBUG: keystoneclient.session REQ: curl -g -i -X GET http://172.30.5.21:9696/v2.0/subnets.json?fields=id&name=private-subnet -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5fe5f7ed8ce3a71e119ba3dfbca42657283726f8"
DEBUG: keystoneclient.session RESP: [200] date: Wed, 14 Oct 2015 19:12:21 GMT connection: keep-alive content-type: application/json; charset=UTF-8 content-length: 61 x-openstack-request-id: req-ef4a0578-0c62-40fd-9593-058526e9d2fc
RESP BODY: {"subnets": [{"id": "fbc4b629-69f7-4c38-bc51-0d90ba376355"}]}

DEBUG: keystoneclient.session REQ: curl -g -i -X POST http://172.30.5.21:9696/v2.0/lbaas/loadbalancers.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}5fe5f7ed8ce3a71e119ba3dfbca42657283726f8" -d '{"loadbalancer": {"vip_subnet_id": "fbc4b629-69f7-4c38-bc51-0d90ba376355", "name": "lb2", "admin_state_up": true}}'
DEBUG: keystoneclient.session RESP: [201] date: Wed, 14 Oct 2015 19:12:22 GMT connection: keep-alive content-type: application/json; charset=UTF-8 content-length: 422 x-openstack-request-id: req-13ff2b40-6d29-43db-bf7a-b802038399eb
RESP BODY: {"loadbalancer": {"description": "", "admin_state_up": true, "tenant_id": "eb9edd97154e46d78f3e1fdb38b0c62b", "provisioning_status": "PENDING_CREATE", "listeners": [], "vip_address": "10.0.0.7", "vip_port_id": "ff827bda-92e5-4a46-a95f-747536e81cc1", "provider": "octavia", "vip_subnet_id": "fbc4b629-69f7-4c38-bc51-0d90ba376355", "id": "1cfd8721-2e60-4dd9-beca-56deaf74a3a3", "operating_status": "OFFLINE", "name": "lb2"}}

Created a new loadbalancer:
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| admin_state_up      | True                                 |
| description         |                                      |
| id                  | 1cfd8721-2e60-4dd9-beca-56deaf74a3a3 |
| listeners           |                                      |
| name                | lb2                                  |
| operating_status    | OFFLINE                              |
| provider            | octavia                              |
| provisioning_status | PENDING_CREATE                       |
| tenant_id           | eb9edd97154e46d78f3e1fdb38b0c62b     |
| vip_address         | 10.0.0.7                             |
| vip_port_id         | ff827bda-92e5-4a46-a95f-747536e81cc1 |
| vip_subnet_id       | fbc4b629-69f7-4c38-bc51-0d90ba376355 |
+---------------------+--------------------------------------+
>$

$>tail -f /opt/stack/logs/q-lbaasv2.log
/dist-packages/oslo_messaging/_drivers/amqpdriver.py:392
2015-10-15 00:46:07.285 ERROR neutron_lbaas.agent.agent_manager [-] Unable to retrieve ready devices
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager Traceback (most recent call last):
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/opt/stack/neutron-lbaas/neutron_lbaas/agent/agent_manager.py", line 151, in sync_state
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     ready_instances = set(self.plugin_rpc.get_ready_devices())
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/opt/stack/neutron-lbaas/neutron_lbaas/agent/agent_api.py", line 34, in get_ready_devices
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     return cctxt.call(self.context, 'get_ready_devices', host=self.host)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 158, in call
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     retry=self.retry)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 90, in _send
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     timeout=timeout, retry=retry)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 431, in send
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     retry=retry)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 420, in _send
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     result = self._waiter.wait(msg_id, timeout)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 318, in wait
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     message = self.waiters.get(msg_id, timeout=timeout)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 223, in get
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager     'to message ID %s' % msg_id)
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager MessagingTimeout: Timed out waiting for a reply to message ID 6eca73cef71442afbb5f2226864df3bf
2015-10-15 00:46:07.285 TRACE neutron_lbaas.agent.agent_manager
2015-10-15 00:46:07.286 WARNING oslo.service.loopingcall [-] Function 'neutron_lbaas.agent.agent_manager.LbaasAgentManager.run_periodic_tasks' run outlasted interval by 50.00 sec
2015-10-15 00:46:07.286 DEBUG oslo_service.periodic_task [-] Running periodic task LbaasAgentManager.collect_stats from (pid=663) run_periodic_tasks /usr/local/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2015-10-15 00:46:07.287 DEBUG oslo_service.periodic_task [-] Running periodic task LbaasAgentManager.periodic_resync from (pid=663) run_periodic_tasks /usr/local/lib/python2.7/dist-packages/oslo_service/periodic_task.py:213
2015-10-15 00:46:07.287 DEBUG oslo_messaging._drivers.amqpdriver [-] MSG_ID is 7c6683b8e1e7478ab038dc1d372d8928 from (pid=663) _send /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py:392

Thanks Advance!

-Prabu