Tempest replaces IPv6 address with IPv4 in Swift tests

Bug #1944728 reported by Christian Schwede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Christian Schwede

Bug Description

These are the headers sent by Tempest:

2021-09-21 19:24:52,372 413895 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'X-Container-Sync-Key': 'sync_key', 'X-Container-Sync-To': 'https://127.0.0.1:db8:fd00:1000::5]:13808/v1/AUTH_3511b6067581482181d91157d0282f57/tempest-TestContainerSync-1122109270', 'X-Auth-Token': '<omitted>'}

Note the X-Container-Sync-To - that URL is wrong. If one uses that URL and does an urlparse in Python it will raise an error in Swift like this:

>>> urlparse("https://127.0.0.1:db8:fd00:1000::5]:13808/v1/AUTH_3511b6067581482181d91157d0282f57/tempest-TestContainerSync-1122109270")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.6/urllib/parse.py", line 369, in urlparse
    splitresult = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python3.6/urllib/parse.py", line 461, in urlsplit
    raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL

The 127.0.0.1 is wrong; the original IPv6 address is replaced within Tempest with the hardcoded IPv4.

https://github.com/openstack/tempest/blob/master/tempest/api/object_storage/test_container_sync.py#L60
https://github.com/openstack/tempest/blob/master/tempest/api/object_storage/test_container_sync.py#L140-L141

Changed in tempest:
assignee: nobody → Christian Schwede (cschwede)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

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

Reviewed: https://review.opendev.org/c/openstack/tempest/+/810681
Committed: https://opendev.org/openstack/tempest/commit/3628631fb097388aaa797429a7f7eb2558171c30
Submitter: "Zuul (22348)"
Branch: master

commit 3628631fb097388aaa797429a7f7eb2558171c30
Author: Christian Schwede <email address hidden>
Date: Thu Sep 23 15:26:29 2021 +0200

    Fix IPv6 localhost replacement in Swift container sync test

    The local IP is replaced with a wrong and irregular value
    if tested with IPv6. This patch fixes this, replacing the
    netloc with the right IPv6 localhost value.

    Closes-Bug: 1944728
    Change-Id: Icb3668abebb4821f1cf4824f4898abb2163e4d99

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

This issue was fixed in the openstack/tempest 29.1.0 release.

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.