]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
LBaaS: unify haproxy-on-host plugin driver and agent
authorOleg Bondarev <obondarev@mirantis.com>
Tue, 6 Aug 2013 08:52:34 +0000 (12:52 +0400)
committerOleg Bondarev <obondarev@mirantis.com>
Tue, 10 Dec 2013 08:08:03 +0000 (12:08 +0400)
commitbf8949defc24af3636da417442469e7d7194c7b3
tree2ec8430ffe719c79271d938b8468dca918143e1b
parentaa5b4f6b2c529c3df49b6e7383c5558e029f1d57
LBaaS: unify haproxy-on-host plugin driver and agent

Unifies haproxy reference implementation to make common agent based plugin driver
which is suitable for all vendors who wants to use async mechanism.

 - Agent API as well as device driver API changed to handle
   loadbalancer objects individually;
 - Agent loads device drivers according to config;
 - LogicalDeviceCache class was removed from agent as it was used only
   as a list - to put and remove entries ant check whether entry is in or not.
   It was replaced with instance_mapping dict in agent to store known instances and
   corresponding device_drivers;
 - Agent reports which device drivers are supported (needs for scheduling on plugin side);
 - Agent-to-plugin API was extended to provide an ability for agent to update
   statuses of pools/vips/members/health_monitors;
 - Vendor should only implement device driver; plugin driver just needs
   to inherit AgentBasedPluginDriver and override device_driver member;
 - This patch doesn't move files to make review easier;
   all rename/replace will be done in a subsequent patch;

DocImpact

NOTE: Since the change in the agent RPC API is backward-incompatible
(major RPC version change), LBaaS server-agent communications will be
completely broken until both sides are upgraded so users will be unable to
create new or update existing HAProxy loadbalancer instances during upgrade

Implements blueprint lbaas-common-agent-driver

Change-Id: I9fd90a1321611d202ef838681273081fa6c1686a
19 files changed:
etc/lbaas_agent.ini
neutron/services/loadbalancer/agent_scheduler.py
neutron/services/loadbalancer/drivers/abstract_driver.py
neutron/services/loadbalancer/drivers/agent_device_driver.py [new file with mode: 0644]
neutron/services/loadbalancer/drivers/haproxy/agent_api.py
neutron/services/loadbalancer/drivers/haproxy/agent_manager.py
neutron/services/loadbalancer/drivers/haproxy/cfg.py
neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py
neutron/services/loadbalancer/drivers/haproxy/plugin_driver.py
neutron/services/loadbalancer/drivers/radware/driver.py
neutron/services/loadbalancer/plugin.py
neutron/tests/unit/db/loadbalancer/test_db_loadbalancer.py
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_agent_manager.py
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_api.py
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_cfg.py
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_namespace_driver.py
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_plugin_driver.py
neutron/tests/unit/services/loadbalancer/test_agent_scheduler.py
neutron/tests/unit/test_agent_ext_plugin.py