[openstack-dev] [octavia] API v2 or v1 or both?

Volodymyr Litovka doka.ua at gmx.com
Mon Dec 4 23:17:58 UTC 2017


Hi colleagues,

when I use in [api_settings] section of octavia.conf

api_v1_enabled = False
api_v2_enabled = True

I'm getting member creation failed:

2017-12-04 22:20:37.326 7199 INFO 
neutron_lbaas.services.loadbalancer.plugin 
[req-2c3d3185-9440-4f3d-90de-dff87de783b9 
e6406606bd9d48aabc413468f9703cf6 c1114776e144400da17d8e060856be8c - 
default default] Calling driver operation LoadBalancerManager.create
2017-12-04 22:20:37.326 7199 DEBUG neutron_lbaas.drivers.octavia.driver 
[req-2c3d3185-9440-4f3d-90de-dff87de783b9 
e6406606bd9d48aabc413468f9703cf6 c1114776e144400da17d8e060856be8c - 
default default] url = http://lagavulin:9876/v1/loadbalancers request 
/usr/lib/python2.7/dist-packages/neutron_lbaas/drivers/octavia/driver.py:138
2017-12-04 22:20:37.327 7199 DEBUG neutron_lbaas.drivers.octavia.driver 
[req-2c3d3185-9440-4f3d-90de-dff87de783b9 
e6406606bd9d48aabc413468f9703cf6 c1114776e144400da17d8e060856be8c - 
default default] args = {"vip": {"subnet_id": 
"1748a90d-25bc-46a0-b623-d8450db83ed1", "port_id": 
"f773321c-eb34-41fa-8434-45358e6232fb", "ip_address": "10.1.1.12"}, 
"name": "nbt-balancer", "project_id": 
"c1114776e144400da17d8e060856be8c", "enabled": true, "id": 
"25604d3c-1714-4837-ad98-8ea2d2f03bc7", "description": ""} request 
/usr/lib/python2.7/dist-packages/neutron_lbaas/drivers/octavia/driver.py:139
2017-12-04 22:20:37.337 7199 DEBUG neutron_lbaas.drivers.octavia.driver 
[req-2c3d3185-9440-4f3d-90de-dff87de783b9 
e6406606bd9d48aabc413468f9703cf6 c1114776e144400da17d8e060856be8c - 
default default] Octavia Response Code: 405 request 
/usr/lib/python2.7/dist-packages/neutron_lbaas/drivers/octavia/driver.py:144
2017-12-04 22:20:37.338 7199 DEBUG neutron_lbaas.drivers.octavia.driver 
[req-2c3d3185-9440-4f3d-90de-dff87de783b9 
e6406606bd9d48aabc413468f9703cf6 c1114776e144400da17d8e060856be8c - 
default default] Octavia Response Body: <html>
  <head>
   <title>405 Method Not Allowed</title>
  </head>
  <body>
   <h1>405 Method Not Allowed</h1>
   The method POST is not allowed for this resource. <br /><br />

  </body>
</html> request 
/usr/lib/python2.7/dist-packages/neutron_lbaas/drivers/octavia/driver.py:145

when I use both v1 and v2 enabled, I see ALL calls to API like 
http://...:9876/_v1_/... and corresponding log records like

2017-12-04 18:12:01.676 27192 INFO octavia.api._v1_.controllers.*

does "v1" means that neutron use LBaaS API v1 instead of v2 ? Neutron 
itself configured to use LBaaS v2 :

[DEFAULT]
service_plugins = 
router,neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
[service_providers]
service_provider = 
LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default

Is it enough or how to configure both neutron and octavia to use API v2 
instead of v1? I'm under Ubuntu 16 and Openstack Pike and there are just 
"python-neutron-lbaas" package installed (no lbaasv2-agent, 
lbaas-common, etc) and octavia itself (using "pip install octavia" in 
_virtual environment_). Thus, endpoints configured unversioned in this way:

+----------------------------------+-----------+--------------+----------------+---------+-----------+--------------------------+
| ID                               | Region    | Service Name | Service 
Type   | Enabled | Interface | URL                      |
+----------------------------------+-----------+--------------+----------------+---------+-----------+--------------------------+
| 18862b1bd4c643aca207f8b2d9066895 | RegionOne | octavia      | 
load-balancer  | True    | internal  | http://lagavulin:9876/   |
| 8cb62ab73fb2431dbc3a0def744852ea | RegionOne | octavia      | 
load-balancer  | True    | public    | http://lagavulin:9876/   |
| 909e9fc434cb4667bb828828bf49f906 | RegionOne | octavia      | 
load-balancer  | True    | admin     | http://lagavulin:9876/   |
+----------------------------------+-----------+--------------+----------------+---------+-----------+--------------------------+

and no neutron lbaas agent in the list of agents (since there is no 
lbaasv2 agent installed and configured in the system).

Seems I'm missing something.

And two related questions:

  * which method to provide API is more preferable - WSGI or standalone
    octavia-api process?
  * how to be sure that Octavia code matches Pike version? I'm using
    "pip install octavia" and it's v1.0.1 at the moment, but not sure it
    matches package "python-neutron-lbaas" version 2:11.0.0-0ubuntu1~cloud0

Thank you.

-- 
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20171205/1a4e4b33/attachment.html>


More information about the OpenStack-dev mailing list