a10networks / a10-neutron-lbaas

A10 Networks, Openstack Neutron LBaaS Driver
Apache License 2.0
9 stars 19 forks source link

Save mapping of which device tenants are stored on in v1/v2 #113

Closed ghost closed 8 years ago

ghost commented 9 years ago

We need to know which device a tenant "lives on" for scaling purposes.

Cedev commented 9 years ago

We need to store which device each loadbalancer/vip is on. Break the indirect dependency

loadbalancer ---> tenant ---> device
              |           ^ hash of tenant id
              ^ neutron table

And replace it with

loadbalancer ---> device
              ^ new table

(The loadbalancer will still know which tenant it belongs to)

Cedev commented 9 years ago

The plan is to make one polymorphic table for loadbalancers (A10_SLB) and another one for devices (A10_DEVICES). In the alembic migrations there'll be separate branches for tables that depend on lbaas v1 and lbaas v2. The SQL alchemy classes for the version specific models will only be defined if there's support for that version.

a10_lb

A10_DEVICES will need a new name; it's used in another one of our products.

Cedev commented 9 years ago

To do:

Cedev commented 9 years ago

To do the migration we need to load the real configuration. I tried hacking one together by making an A10OpenstackLBV1(None), but that doesn't get the provider name so we don't know which vips are ours. We're going to have to figure out how to load the real deal, enumerate the providers, and check to see if they are the a10 provider we're working with.

Cedev commented 9 years ago

The following demonstrates getting the (almost) real configuration for the drivers. It doesn't provide a plugin and doesn't import all of the set up for oslo configuration that is set up when a driver loads for real.

import neutron.plugins.common.constants as constants
import neutron.services.service_base as service_base
from oslo_config import cfg

cfg.CONF(project='neutron')

lbv2 = service_base.load_drivers(constants.LOADBALANCERV2,None)
print lbv2
print lbv2[0][lbv2[1]].a10.hooks.select_device('012-345')

The migrations are going to use this mechanism to get the drivers and their provider names.

Cedev commented 9 years ago

The cli unfortunately includes a workaround for alembic issue 336.

Cedev commented 9 years ago

Blocked by #122