Bug 1971520

Summary: HEAT stack does not support the load balancing algorithm SOURCE_IP_PORT in pool definitions
Product: Red Hat OpenStack Reporter: Omer Schwartz <oschwart>
Component: openstack-heatAssignee: Brendan Shephard <bshephar>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: high Docs Contact:
Priority: high    
Version: 16.1 (Train)CC: aschultz, bbonguar, bshephar, cjeanner, gthiemon, oschwart
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-heat-13.1.0-1.20210712163305.48b730a.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-09 20:19:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Omer Schwartz 2021-06-14 09:08:53 UTC
+++ This bug was initially created as a clone of Bug #1887424 +++

Description of problem:

HEAT stack does not support the load balancing algorithm SOURCE_IP_PORT in pool definitions

Version-Release number of selected component (if applicable):

OSP: 16.1
HEAT: all versions


How reproducible:
 100%

Steps to Reproduce:
1.Build a yaml HEAT template with the parameter "lb_algorithm: SOURCE_IP_PORT"
2.Try to run the template with "openstack stack create -t ..."

Actual results:

"RESP BODY: {"code": 400, "title": "Bad Request", "explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "error": {"type": "StackValidationFailed", "traceback": null, "message": "Property error: : resources.pool.properties.lb_algorithm: : \"SOURCE_IP_PORT\" is not an allowed value [\"ROUND_ROBIN\", \"LEAST_CONNECTIONS\", \"SOURCE_IP\"]"}}


Expected results:

The stack should be successfully built


Additional info:


SOURCE_IP_PORT is the ONLY load balancing algorithm currently supported by the OVN Provider driver.

Comment 5 David Rosenfeld 2021-09-15 17:36:48 UTC
Enabled octavia by including: -e /usr/share/openstack-tripleo-heat-templates/environments/services/octavia.yaml in deploy command

Created a load balancer, listener, and pool:

openstack loadbalancer create --name lb1 --vip-subnet-id lb-subnet
openstack loadbalancer listener create --name listener1 --protocol HTTP --protocol-port 80 lb1
openstack loadbalancer pool create --name pool1 --lb-algorithm ROUND_ROBIN --listener listener1 --protocol HTTP

Used this yaml:

heat_template_version: rocky

parameters:


resources:
   TestLbPool:
        type: OS::Octavia::Pool
        properties:
          admin_state_up: false
          description: "Test Pool"
          lb_algorithm: "SOURCE_IP_PORT"
          listener: "c057dc8f-f81b-4ea4-8e07-3cb652cad6f8"
          protocol: "HTTP"

Was able to create a stack using SOURCE_IP_PORT load balancing algorithm:

openstack stack create -t testlb.yaml stacktest
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| id                  | ed9c0e3b-ab11-4e34-9846-d73181e01aa7 |
| stack_name          | stacktest                            |
| description         | No description                       |
| creation_time       | 2021-09-15T15:23:18Z                 |
| updated_time        | None                                 |
| stack_status        | CREATE_IN_PROGRESS                   |
| stack_status_reason | Stack CREATE started                 |
+---------------------+--------------------------------------+

Comment 16 errata-xmlrpc 2021-12-09 20:19:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.7 (Train) bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:3762