senlin.policy.loadbalance fails when session_persistence not set

Bug #1934543 reported by hamza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
Undecided
Unassigned

Bug Description

type: senlin.policy.loadbalance
version: 1.1
properties:
  availability_zone: AZ
  pool:
    protocol: HTTP
    protocol_port: 80
    subnet: $SUBNET
    lb_method: LEAST_CONNECTIONS
    admin_state_up: true
  vip:
    subnet: $SUBNET
    protocol: HTTP
    protocol_port: 80
    admin_state_up: true
  health_monitor:
    type: HTTP
    delay: 10
    timeout: 5
    max_retries: 3
    admin_state_up: true
    http_method: GET
    url_path: /status.html
    expected_codes: 200
  lb_status_timeout: 1200

fails with the following error

Traceback (most recent call last):
/senlin/drivers/sdk.py", line 102, in invoke_with_catch
    return func(driver, *args, **kwargs)
senlin/drivers/os/octavia_v2.py", line 105, in pool_create
    if session_persistence['type'] != 'APP_COOKIE':
KeyError: 'type'

when the following values not set

    session_persistence:
      type: HTTP_COOKIE
      cookie_name: my_cookie

although the above options are not mandatory for creating a pool

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/senlin/+/799335

Changed in senlin:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.opendev.org/c/openstack/senlin/+/799335
Committed: https://opendev.org/openstack/senlin/commit/cd33c1256fc2b07ac537caca19ca1e25a3feb025
Submitter: "Zuul (22348)"
Branch: master

commit cd33c1256fc2b07ac537caca19ca1e25a3feb025
Author: hamza alqtaishat <email address hidden>
Date: Fri Jul 2 22:18:25 2021 +0000

    senlin.policy.loadbalance module fix key error

    the pool can be created without setting the var below
    session_persistence[type|cookie_name]

    Closes-Bug: 1934543

    Change-Id: I08eecb2c45d2cb1f730e6b9d8bb549306b3a2f89

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 12.0.0.0rc1

This issue was fixed in the openstack/senlin 12.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.