F5Networks / f5-openstack-agent

The F5 Agent for OpenStack Neutron allows you to deploy BIG-IP services in an OpenStack environment.
http://clouddocs.f5.com/products/openstack/agent/latest
Apache License 2.0
14 stars 38 forks source link

ESD persistence settings overwritten by pool's session persistence update #1062

Closed pjbreaux closed 6 years ago

pjbreaux commented 6 years ago

OpenStack Release

found in mitaka

Description

When lbaas_persist and lbaas_fallback_persist are defined in a an esd JSON specification, these settings will be first applied to the virtual server properly, but due to a call here, they are overwritten with whatever persistence is defined for the pool. The result of the update_session_persistence call is shown below. This is an issue with conflicting sources of information about session persistence, meaning it can be defined on the pool or on the esd specification.

patch WITH uri: https://172.16.1.19:443/mgmt/tm/ltm/virtual/~Project_8b1447974c7049b1bf652df988cdd3af~Project_2931f171-8f00-4eeb-a61e-e4300c1ed3f0/ AND suffix:  AND kwargs: {'json': {'partition': u'Project_8b1447974c7049b1bf652df988cdd3af', 'fallbackPersistence': '', 'name': u'Project_2931f171-8f00-4eeb-a61e-e4300c1ed3f0', 'persist': []}}

Here was the esd spec used:

{
  "esd_demo_1": {
    "lbaas_ctcp": "tcp-mobile-optimized",
    "lbaas_stcp": "tcp-lan-optimized",
    "lbaas_cssl_profile": "clientssl",
    "lbaas_sssl_profile": "serverssl",
    "lbaas_irule": ["_sys_https_redirect"],
    "lbaas_policy": ["demo_policy"],
    "lbaas_persist": "hash",
    "lbaas_fallback_persist": "source_addr"
  }
}

It should be noted that the driver tempest test api/test_esd.py::ESDTestJSON::test_create_esd often fails due to the issue. When commenting out the offending line above, it passes. But another way must be devised to account for session persistence on the pool and in esd.

richbrowne commented 6 years ago

Fixed by: ffe2b124bb51f10b0eb10d774720d9985507b66b