a10networks / a10-neutron-lbaas

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

Add TCP_PROXY support #458

Open eandersson opened 5 years ago

eandersson commented 5 years ago

It would be nice to be able to use tcp-proxy with neutron-lbaas. Maybe as an added feature to the expressions pattern (e.g. vport_expressions).

ghost commented 5 years ago

@eandersson IIRC we apply vport expressions right before we submit the payload to AXAPI. Overriding the protocol attribute in the vport dict would cause that protocol to be set regardless of the protocol sent to the neutron-lbaas endpoint.

We've evaluated augmenting the supported LB protocol types in the past and ran into problems when we utilized more than 1 provider as it required monkey-patching. We had no way of narrowing the scope of the monkey patch to only load when our plugin loaded.

eandersson commented 5 years ago

I actually was just testing that and hit this

Driver error: update() got multiple values for keyword argument 'protocol'

vport_expressions = {
    "TCP Proxy":
        {
            "regex": "-test-",
            "json": {
                "protocol": "tcp-proxy"
            }
        },
}

But didn't do much validation, so might just be missing something.

eandersson commented 5 years ago

I think it's just this code that needs to be removed, or re-worked for it to work.

template_args.update(**self._get_vport_defaults(c, os_name))

https://github.com/a10networks/a10-neutron-lbaas/blob/master/a10_neutron_lbaas/v2/handler_listener.py#L152