Allow custom attributes for configuring tenant lbaas

Registered by Varun Lodaya

Requirements:
Today, a lot of applications using lbaas have specific requirements(e.g. specific TCP timeouts, ciphers, specific maxconn, etc). Since HAProxy instances always get spun up with fixed set of configs, we have to manually modify these custom parameters for the customers. Then the pain is maintaining it when the haproxy gets respun on a different hypervisor.
Giving the user capability to manage his own custom lbaas config which is maintained in the database like other configs takes all the pain away from Operator.

Proposed design:
We are proposing a design which will cater to this particular use case as well as take care of upcoming features like A10/F5 hardward support, LBaaSv2. Following would be custom-attr flow:
1) User creates/updates VIP with --custom-attributes key-value through CLI/API.
2)VNC API saves the custom_attributes in the database in key-value format.
3) svc_monitor creates a service instance from the VIP but before launching the SI on any vrouter, custom_attributes have to be validated. We are planning on having multiple validator files(1 for each provider like A10, HAProxy, F5) and the operator maintains those files based on their environment and what they want to allow the user to do.
4) If validation fails, we move the VIP/SI in errored state (still some detailed analysis to be done here)
5) If validation is successful, the custom_attributes are pushed to the LB instance.
6) In case of HAProxy, the haproxy_config.py file picks it up and updates the HAProxy config file accordingly.

Code Changes Involved:
1) Need to add new kev-val schema in loadbalancer.xsd
2) Add an extension to lbaas attributes to accept this new key-value json. Also modify the neutron lbaas extension to understand the new attributes and populate the vip object with these new attributes.
3) Added code to vrouter agent to parse these key_value pairs correctly and update the config.json accordingly. Also, the haproxy_config.py has to be modified to pick up these changes.
4) Need to add additional logic in svc_monitor code to validate the new validation files. Accordingly need to standardise these new validation files and repackage the template in standard deployment.
5) Write testcases around all the pieces, changes involved in atleast vrouter code, config (new schema), and neutron lbaas extension.

Blueprint information

Status:
Not started
Approver:
Rudra Rugge
Priority:
High
Drafter:
Varun Lodaya
Direction:
Needs approval
Assignee:
Varun Lodaya
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.