58cda714ba
This patch implements the Active/Standby blueprint in https://blueprints.launchpad.net/octavia/+spec/activepassiveamphora The following points describe the main changes: 1. The patch introduces new flows and subflows to create M amphorae. The controller worker parses the loadbalancer_topology configuration. If the loadbalancer_topology value is ACTIVE_STANDBY, the controller invokes a new flow independent from the SINGLE topology case, which is left untouched. The new flow uses conditional taskflows to check for spare amphorae at runtime. This removes the need for the exception workaround we earlier had. The controller creates the amphorae in parallel using an unordered flow. A new database task alter an amphora role as either MASTER or BACKUP and assigns a VRRP priority to each amphora. After the amphorae are created, the controller invokes a separate flow for post amphora configuration including plug_vip methods, vrrp configuration upload, and keepalived service start. 2. The patch introduces new data models that include a new table for VRRP group configuration per loadbalancer, and update the amphora, loadbalancer, and listener tables to support the new active/standby capability. The VRRPGroup table hides authentication data, and makes future extensions of VRRP capabilities easy. 3. This patch updates the existing Haproxy configuration templates to include peer synchronization. In case of ACTIVE_STANDBY configuration, the jinja configuration renders the peer section in the Haproxy configuration and assigns short names to the amphorae as listener peers. As listeners implies different Haproxy process, each listener synchronizes on a different port evaluated as BASE_PORT (1024) + NUMBER_OF_LISTENERS accounting for ports in use. 4. This patch introduces a new Jinja configuration templater and a REST driver for Keepalived (developed as a Mixin). By default, Keepalived runs "all" check scripts found in a predefined directory. The keepalived driver is a Mixin that can be plugged in other services' drivers. It is the responsibility of these services drivers to introduce their own check scripts. In this patch a lightweight check script for Haproxy was introduced along with changes in the amphora agent installation script. 5. The VRRP requires enabling protocol 112 for Master/Backup advertisements, and enabling protocol 51 for authentication header. This patch enables these protocols as needed in the loadbalancer security group. Note: Updates to the failover flow to support active/standby will come in a dependent patch. Note: The amphora-agent is pinned to this patch in this patch set. This is required so the scenario tests will pass. It will be removed in a follow up patch. Co-Authored-By: Sherif Abdelwahab <sherif.abdelwahab@hp.com> Co-Authored-By: Michael Johnson <johnsomor@gmail.com> Implements: blueprint activepassiveamphora Depends-On: Ifdf20378b26cdd13e0a3ff87cec8990fe89c0661 Change-Id: Ic4e04594e114ba682088d68d5f1af3f8f376db83
0 lines
Python
0 lines
Python