Bug 2171815 - ValueError on attempt to override allowed_network_downtime with a float value
Summary: ValueError on attempt to override allowed_network_downtime with a float value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ga
: 17.1
Assignee: Roman Safronov
QA Contact: Lukas Piwowarski
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-20 13:51 UTC by Roman Safronov
Modified: 2023-08-16 01:14 UTC (History)
5 users (show)

Fixed In Version: openstack-tempest-33.0.0-1.20230308130919.1580f6f.el9ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-16 01:13:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 874420 0 None MERGED Allow float value when overriding downtime 2023-03-05 10:51:55 UTC
Red Hat Issue Tracker OSP-22512 0 None None None 2023-02-20 13:51:47 UTC
Red Hat Product Errata RHEA-2023:4577 0 None None None 2023-08-16 01:14:23 UTC

Description Roman Safronov 2023-02-20 13:51:30 UTC
Description of problem:
allowed_network_downtime is configured as an integer option while
a default value is set to a float number. When a user tries to
override the option with another float number he receives a ValueError.
This patch changes the option to allow overriding with a float
number.

Version-Release number of selected component (if applicable):
RHOS-17.1-RHEL-9-20221215.n.1

How reproducible:
100% when a user tries to override allowed_network_downtime with a float number (since a default float value of 5.0 confuses the user). Overriding with an integer value works.

Steps to Reproduce:
1.Put into tempest.conf under [validation] section a value  allowed_network_downtime = 6.0
2.Try to run a test, e.g. 'stestr run tempest.scenario.test_network_advanced_server_ops.TestNetworkAdvancedServerOps.test_server_connectivity_live_migration' or just    'stestr list'


Actual results:
Failed to import test module: tempest.api.compute.admin.test_create_server
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/oslo_config/cfg.py", line 2720, in _do_get
    return (convert(val), alt_loc)
  File "/usr/lib/python3.9/site-packages/oslo_config/cfg.py", line 2689, in convert
    return self._convert_value(
  File "/usr/lib/python3.9/site-packages/oslo_config/cfg.py", line 2817, in _convert_value
    return opt.type(value)
  File "/usr/lib/python3.9/site-packages/oslo_config/types.py", line 311, in __call__
    value = self.num_type(value)
ValueError: invalid literal for int() with base 10: '6.0'


Expected results:
No errors


Additional info:

Comment 8 Lukas Piwowarski 2023-03-30 12:41:55 UTC
I'm moving this to VERIFIED - the patch is present for the "Fixed In Version" package (see the attached log file verifying-bug-2171815.txt).

Comment 16 errata-xmlrpc 2023-08-16 01:13:59 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 (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), 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/RHEA-2023:4577


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