Bug #82132
closedtest/rgw/multisite: test_multi.py ignores its config file on Python 3.12 (ConfigParser.readfp() removed)
0%
Description
src/test/rgw/test_multi.py reads its config with ConfigParser.readfp(). That method was deprecated in Python 3.2 and removed in 3.12. On 3.12 the call raises AttributeError, which the surrounding bare except: swallows, printing only:
WARNING: error reading test config. Path can be set through the RGW_MULTI_TEST_CONF env variable
The file named by RGW_MULTI_TEST_CONF is therefore silently ignored and init() runs with defaults.
In particular no_bootstrap=true has no effect: the test tries to bootstrap new clusters on top of already-running ones and fails with Address already in use before any test runs.
Proposed fix: Python 3.11 and earlier. readfp(f) is a deprecated alias for read_file(f). So, jsut do cfg.readfp(f) -> cfg.read_file(f). read_file existed since Python 3.2 and is the documented replacement, so the change is safe on every Python version these tests support.
Related: The multisite tests need more than this fix to run on 3.12: test_multi.py imports zone_es.py/zone_cloud.py, which import the legacy boto package, and that fails on 3.12 (see #72500 , which covers ragweed/s3-tests). That is a separate problem and not addressed here.
OO Updated by Oguzhan Ozmen about 1 month ago
- Pull request ID set to 73116
UB Updated by Upkeep Bot about 1 month ago
- Copied to Backport #82297: tentacle: test/rgw/multisite: test_multi.py ignores its config file on Python 3.12 (ConfigParser.readfp() removed) added
UB Updated by Upkeep Bot about 1 month ago
- Copied to Backport #82298: umbrella: test/rgw/multisite: test_multi.py ignores its config file on Python 3.12 (ConfigParser.readfp() removed) added
UB Updated by Upkeep Bot about 1 month ago
- Status changed from Fix Under Review to Backporting
- Merge Commit set to 9051a74bbbb68f701eeec72f4cd82641c46a7208
- Fixed In set to v22.0.0-53-g9051a74bbb
- Upkeep Timestamp set to 2026-10-29T12:50:02+00:00
UB Updated by Upkeep Bot 8 days ago
- Status changed from Backporting to Resolved
- Upkeep Timestamp changed from 2026-10-29T12:50:02+00:00 to 2026-11-26T01:10:35+00:00