Bug 2294369 - 'openstack loadbalancer healthmonitor set' requires '--delay <value>' in addition to the desired field.
Summary: 'openstack loadbalancer healthmonitor set' requires '--delay <value>' in addi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-octavia
Version: 17.1 (Wallaby)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: z4
: 17.1
Assignee: Gregory Thiemonge
QA Contact: Arkady Shtempler
Greg Rakauskas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-06-26 06:15 UTC by Keigo Noha
Modified: 2024-11-21 09:41 UTC (History)
4 users (show)

Fixed In Version: openstack-octavia-8.0.2-17.1.20240702130757.8cbe692.el9ost
Doc Type: Bug Fix
Doc Text:
In previous RHOSP releases, users were unable to update the delay of a Load-balancing service (octavia) UDP health monitor. This problem was caused by a bug in the validation of parameters used to configure UDP health monitors. In RHOSP 17.1.4, this bug has been fixed, and users can now modify the delay for UDP health monitors.
Clone Of:
Environment:
Last Closed: 2024-11-21 09:41:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 2059894 0 None None None 2024-06-26 06:15:55 UTC
OpenStack gerrit 914811 0 None MERGED Handle empty delay on update healthmonitor 2024-06-26 06:15:55 UTC
Red Hat Issue Tracker OSP-32387 0 None None None 2024-06-26 06:16:27 UTC
Red Hat Product Errata RHBA-2024:9974 0 None None None 2024-11-21 09:41:37 UTC

Description Keigo Noha 2024-06-26 06:15:56 UTC
Description of problem:
'openstack loadbalancer healthmonitor set' requires '--delay <value>' in addition to the desired field. 

For example, a user tries to update the name of the healthmonitor for UDP connect.
~~~
$ openstack loadbalancer healthmonitor set --name test f6cfe1e4-f66d-47cd-a1a5-2c410e9f93ca
'<' not supported between instances of 'UnsetType' and 'int' (HTTP 500) (Request-ID: req-56355543-14ff-41ec-b99c-4a7cc1a04b94)
~~~

~~~
2024-06-26 05:41:18.046 17 ERROR wsme.api [req-56355543-14ff-41ec-b99c-4a7cc1a04b94 - 4b6e4255d565414a9e1868e5957b30a1 - default default] Server-side error: "'<' not supported between instances of 'UnsetType' and 'int'". Detail: 
Traceback (most recent call last):

  File "/usr/lib/python3.9/site-packages/wsmeext/pecan.py", line 85, in callfunction
    result = f(self, *args, **kwargs)

  File "/usr/lib/python3.9/site-packages/octavia/api/v2/controllers/health_monitor.py", line 358, in put
    self._validate_healthmonitor_request_for_udp_sctp(health_monitor,

  File "/usr/lib/python3.9/site-packages/octavia/api/v2/controllers/health_monitor.py", line 188, in _validate_healthmonitor_request_for_udp_sctp
    if hm_is_type_udp and request.delay < conf_min_delay:

TypeError: '<' not supported between instances of 'UnsetType' and 'int'

2024-06-26 05:41:18.697 18 DEBUG octavia.common.keystone [req-8d738b65-c0ef-4f71-abb4-a76ad81e9063 - - - - -] Request path is /healthcheck and it does not require keystone authentication process_request /usr/lib/python3.9/site-packages/octavia/common/keystone.py:76
2024-06-26 05:41:18.703 19 DEBUG octavia.common.keystone [req-61bba16e-e26e-43c6-8c5f-79836d005c6b - - - - -] Request path is /healthcheck and it does not require keystone authentication process_request /usr/lib/python3.9/site-packages/octavia/common/keystone.py:76
2024-06-26 05:41:18.703 16 DEBUG octavia.common.keystone [req-6792d900-7d9e-4322-8853-2e55ffc5c537 - 4b6e4255d565414a9e1868e5957b30a1 - default default] Request path is /healthcheck and it does not require keystone authentication process_request /usr/lib/python3.9/site-packages/octavia/common/keystone.py:76
2024-06-26 05:41:20.704 17 DEBUG octavia.common.keystone [req-56355543-14ff-41ec-b99c-4a7cc1a04b94 - 4b6e4255d565414a9e1868e5957b30a1 - default default] Request path is /healthcheck and it does not require keystone authentication process_request /usr/lib/python3.9/site-packages/octavia/common/keystone.py:76
~~~

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

How reproducible:
Everytime when a user runs 'openstack loadbalancer healthmonitor set' command without '--delay <value>' option.

Steps to Reproduce:
1. Deploy overcloud
2. Create loadbalancer for UDP according to https://docs.openstack.org/octavia/latest/user/guides/basic-cookbook.html#deploy-a-udp-load-balancer-with-a-health-monitor
3. Run 'openstack loadbalancer healthmonitor set' command without '--delay <value>' option.

Actual results:
The command gets error and the request is not completed.

~~~
$ openstack loadbalancer healthmonitor set --name test f6cfe1e4-f66d-47cd-a1a5-2c410e9f93ca
'<' not supported between instances of 'UnsetType' and 'int' (HTTP 500) (Request-ID: req-56355543-14ff-41ec-b99c-4a7cc1a04b94)
~~~

Expected results:
The openstack loadbalancer healthmonitor set command succeeds.

Additional info:
This issue is reported at upstream, https://bugs.launchpad.net/octavia/+bug/2059894
Upstream fix is https://review.opendev.org/c/openstack/octavia/+/914811

Comment 14 Gregory Thiemonge 2024-11-21 08:00:21 UTC
Verification
------------

openstack loadbalancer create --vip-subnet external_subnet --name lb1 --wait
openstack loadbalancer listener create --protocol UDP --protocol-port 1234 --name listener1 lb1 --wait
openstack loadbalancer pool create --protocol UDP --lb-algorithm ROUND_ROBIN --name pool1 --listener listener1 --wait
openstack loadbalancer healthmonitor create --delay 5 --timeout 3 --max-retries 3 --type UDP-CONNECT --name hm1 pool1 --wait

(overcloud) [stack@undercloud-0 ~]$ openstack loadbalancer healthmonitor set --name hm2 hm1
(overcloud) [stack@undercloud-0 ~]$ openstack loadbalancer healthmonitor show hm2
/usr/lib/python3.9/site-packages/osc_lib/utils/__init__.py:448: DeprecationWarning: The usage of formatter functions is now discouraged. Consider using cliff.columns.FormattableColumn instead. See reviews linked with bug 1687955 for more detail.
  warnings.warn(
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| project_id          | 5163d63c37114ffabee0a62764de9d98     |
| name                | hm2                                  |
| admin_state_up      | True                                 |
| pools               | 7fee3e6f-00f5-48e1-9ca7-63338e961f54 |
| created_at          | 2024-11-21T07:58:15                  |
| provisioning_status | ACTIVE                               |
| updated_at          | 2024-11-21T07:58:48                  |
| delay               | 5                                    |
| expected_codes      | None                                 |
| max_retries         | 3                                    |
| http_method         | None                                 |
| timeout             | 3                                    |
| max_retries_down    | 3                                    |
| url_path            | None                                 |
| type                | UDP-CONNECT                          |
| id                  | 1efaca60-2871-4f39-b63f-42451c69ae06 |
| operating_status    | ONLINE                               |
| http_version        | None                                 |
| domain_name         | None                                 |
| tags                |                                      |
+---------------------+--------------------------------------+

LGTM

Comment 16 errata-xmlrpc 2024-11-21 09:41:34 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 (RHOSP 17.1.4 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-2024:9974


Note You need to log in before you can comment on or make changes to this bug.