Bug 1320098 - With LB, pagination url become incorrect
Summary: With LB, pagination url become incorrect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 7.0 (Kilo)
Assignee: Gorka Eguileor
QA Contact: lkuchlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-22 10:11 UTC by Arx Cruz
Modified: 2016-08-01 01:04 UTC (History)
5 users (show)

Fixed In Version: openstack-cinder-2015.1.3-5.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, Cinder did not take the "X-Forwarded-Host" header into account when generating pagination links, using the real server IP address instead of that of the load balancer. With this update, the "X-Forwarded-Host" header is used to build links if present.
Clone Of:
Environment:
Last Closed: 2016-04-26 15:30:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1488373 0 None None None 2016-03-22 10:11:24 UTC
Red Hat Product Errata RHBA-2016:0688 0 normal SHIPPED_LIVE openstack-cinder bug fix advisory 2016-04-26 19:29:10 UTC

Description Arx Cruz 2016-03-22 10:11:25 UTC
Description of problem:
With LoadBalancer, we expect the url with virtual ip in API response.
But cinder-api returns the url with actual server ip.

So test test_volume_list_details_pagination and test_volume_list_pagination raise MismatchError

Version-Release number of selected component (if applicable):
openstack-cinder-7.0.1-8.el7ost.noarch


Steps to Reproduce:
1. Install osp7
2. Run tempest


Actual results:
Test fails with:
MismatchError: !=:
reference = u'http://192.168.1.101:13776/v2/d471371a1f0d43859e21f15d58bcb306/volumes/detail?limit=1&marker=dba665f6-47b5-4f94-a41e-93f3d3ed020f'
actual    = 'https://192.168.1.101:13776/v2/d471371a1f0d43859e21f15d58bcb306/volumes/detail?limit=1&marker=dba665f6-47b5-4f94-a41e-93f3d3ed020f'

Expected results:
Test pass

Additional info:

Comment 3 lkuchlan 2016-04-10 11:52:18 UTC
Tested using:
openstack-cinder-2015.1.2-5.el7ost.noarch

[stack@undercloud tempest]$ testr run tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_details_pagination
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list 
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover}  --load-list /tmp/tmpuaqTsX
Ran 1 tests in 28.485s
PASSED (id=0)

[stack@undercloud tempest]$ testr list-tests | grep test_volume_list_pagination
tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_pagination[id-af55e775-8e4b-4feb-8719-215c43b0238c]
[stack@undercloud tempest]$ testr run tempest.api.volume.v2.test_volumes_list.VolumesV2ListTestJSON.test_volume_list_pagination
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list 
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover}  --load-list /tmp/tmpE6dvQi
Ran 1 tests in 17.345s (+13.079s)
PASSED (id=1)

Comment 5 errata-xmlrpc 2016-04-26 15:30:35 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, 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://rhn.redhat.com/errata/RHBA-2016-0688.html


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