can't get networking-odl LBaaS driver to work

Bug #1559939 reported by Martin Banszel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Invalid
Low
Unassigned

Bug Description

Hello,

I am trying to get the **neutron-lbaas** work with **odl lbaas driver**. My setup is devstack stable/liberty, a host running ODL beryllium 0.4.1, on the host two virtualboxes one for the controller and one for the compute node.

**My question is: is that implemented in networking-odl? Did it ever work?**

When I tried to create a load balancer:

    neutron lbaas-loadbalancer-create --name lb1 39a1eae8-8091-4e8a-9f27-5cac3064b179

I get:

    Request Failed: internal server error while processing your request.

Looking into the q-svc.log I can see that there is attribute exception:

     2016-03-16 11:05:32.565 ERROR neutron.api.v2.resource [req-5c9b5276-f092-4a1d-9acc-5b4cb6b9c647 admin 1a224a307d2249238d44a0bd5b999430] create failed
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource Traceback (most recent call last):
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 83, in resource
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource result = method(request=request, **args)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 410, in create
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource return self._create(request, body, **kwargs)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 147, in wrapper
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 204, in __exit__
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 137, in wrapper
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource return f(*args, **kwargs)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 521, in _create
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource obj = do_create(body)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 503, in do_create
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource request.context, reservation.reservation_id)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 204, in __exit__
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 496, in do_create
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource return obj_creator(request.context, **kwargs)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/plugin.py", line 516, in create_loadbalancer
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource allocate_vip=not driver.load_balancer.allocates_vip)
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource AttributeError: 'NotImplementedManager' object has no attribute 'allocates_vip'
        2016-03-16 11:05:32.565 TRACE neutron.api.v2.resource

Looking into
https://github.com/openstack/neutron-lbaas/blob/stable/liberty/neutron_lbaas/drivers/driver_base.py#L44
and comparing to the constructor of the ODL LBaaS driver class:
https://github.com/openstack/networking-odl/blob/stable/liberty/networking_odl/lbaas/driver_v2.py#L32

it seems to me that the memebrs in ODL driver have wrong names. I changed them to match the neutron-lbaas code, so from:

     self._loadbalancer = ODLLoadBalancerManager(self.client)
        self._listener = ODLListenerManager(self.client)
        self._pool = ODLPoolManager(self.client)
        self._member = ODLMemberManager(self.client)
        self._healthmonitor = ODLHealthMonitorManager(self.client)

I made a change to:

      self.load_balancer = ODLLoadBalancerManager(self.client)
        self.listener = ODLListenerManager(self.client)
        self.pool = ODLPoolManager(self.client)
        self.member = ODLMemberManager(self.client)
        self.healthmonitor = ODLHealthMonitorManager(self.client)

After this change, I got a little bit further. After trying to create the loadbalancer I get this error:

    [stack@control networking-odl]$ neutron lbaas-loadbalancer-create --name lb1 39a1eae8-8091-4e8a-9f27-5cac3064b179
    An error happened in the driver

q-svc.log:

    2016-03-16 12:16:23.139 ERROR neutron_lbaas.services.loadbalancer.plugin [req-c2d1ec10-a657-4ce6-ac71-38ff2b18c6eb admin 1a224a307d2249238d44a0bd5b999430] There was an error in the dri
    ver
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin Traceback (most recent call last):
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/plugin.py", line 471, in _call_driver_oper
    ation
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin driver_method(context, db_entity)
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/oslo_log/helpers.py", line 46, in wrapper
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin return method(*args, **kwargs)
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/networking_odl/lbaas/driver_v2.py", line 70, in create
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin self.client.sendjson('post', self.url_path, None)
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/networking_odl/common/client.py", line 42, in sendjson
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin r.raise_for_status()
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/requests/models.py", line 837, in raise_for_status
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin raise HTTPError(http_error_msg, response=self)
    2016-03-16 12:16:23.139 TRACE neutron_lbaas.services.loadbalancer.plugin HTTPError: 404 Client Error: Not Found for url: http://20.99.0.1:8087/controller/nb/v2/neutron/lbaasloadbalancers

When playing with wget I figured out that the URL seems to be wrong and wget http://20.99.0.1:8087/controller/nb/v2/neutron/lbaas/loadbalancers
actually returns some answer (other than 404) -- I get a list of exsiting loadbalancers. So it seems that '/' is missing in the url in the code.

When I added the slash to the url, I get this error:

    2016-03-16 13:22:26.174 ERROR neutron_lbaas.services.loadbalancer.plugin [req-2d26c5a0-61be-415c-aa4f-622644cf1ccb admin 1a224a307d2249238d44a0bd5b999430] There was an error in the dri
    ver
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin Traceback (most recent call last):
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/plugin.py", line 471, in _call_driver_oper
    ation
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin driver_method(context, db_entity)
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/oslo_log/helpers.py", line 46, in wrapper
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin return method(*args, **kwargs)
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/networking_odl/lbaas/driver_v2.py", line 70, in create
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin self.client.sendjson('post', self.url_path, None)
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/networking_odl/common/client.py", line 42, in sendjson
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin r.raise_for_status()
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin File "/usr/lib/python2.7/site-packages/requests/models.py", line 837, in raise_for_status
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin raise HTTPError(http_error_msg, response=self)
    2016-03-16 13:22:26.174 TRACE neutron_lbaas.services.loadbalancer.plugin HTTPError: 400 Client Error: Bad Request for url: http://20.99.0.1:8087/controller/nb/v2/neutron/lbaas/loadbalancers

Looking into the code, it posts an empty request:
https://github.com/openstack/networking-odl/blob/stable/liberty/networking_odl/lbaas/driver_v2.py#L68

    @log_helpers.log_method_call
    def create(self, context, obj):
        self.client.sendjson('post', self.url_path, None)

but according to the wiki (https://wiki.opendaylight.org/view/OVSDB_Integration:LBaaS#Testing)
it seems that there should be a body.

Also the v1 driver seems to be all stubs. (https://github.com/openstack/networking-odl/blob/stable/liberty/networking_odl/lbaas/driver_v1.py)

Thank you.

Martin Banszel

Tags: lbaas
Changed in networking-odl:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-odl (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/315135
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Isaku Yamahata (yamahata) wrote :

Recently many fixes went in.

Changed in networking-odl:
status: Confirmed → Incomplete
Revision history for this message
Isaku Yamahata (yamahata) wrote :

This is too old to mark this invalid.
If you still have the issue, please reopen it.

Changed in networking-odl:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.