Bug 2171815

Summary: ValueError on attempt to override allowed_network_downtime with a float value
Product: Red Hat OpenStack Reporter: Roman Safronov <rsafrono>
Component: openstack-tempestAssignee: Roman Safronov <rsafrono>
Status: CLOSED ERRATA QA Contact: Lukas Piwowarski <lpiwowar>
Severity: low Docs Contact:
Priority: low    
Version: 17.1 (Wallaby)CC: apevec, lhh, mkopec, slinaber, udesale
Target Milestone: gaKeywords: Triaged
Target Release: 17.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tempest-33.0.0-1.20230308130919.1580f6f.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 01:13:59 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 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