List Availability Zones API is broken on PostgreSQL

Bug #1506938 reported by Valeriy Ponomaryov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Valeriy Ponomaryov

Bug Description

See logs [1] and [2].

API "list availability zones" does not work using PostreSQL and fails with code 500 and following error:

2015-10-16 14:02:42,216 2351 INFO [tempest_lib.common.rest_client] Request (AvailabilityZonesTest:test_list_availability_zones_core_api): 500 GET http://127.0.0.1:8786/v2/79ae5e0965f04c84a59eeb3f998a17ef/availability-zones 0.118s
2015-10-16 14:02:42,217 2351 DEBUG [tempest_lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'X-Auth-Token': '<omitted>', 'x-openstack-manila-api-version': '2.7', 'Accept': 'application/json'}
        Body: None
    Response - Headers: {'date': 'Fri, 16 Oct 2015 14:02:42 GMT', 'x-openstack-manila-api-version': '2.7', 'content-type': 'application/json; charset=UTF-8', 'x-compute-request-id': 'req-2673853b-fa95-4f3f-b477-d6741e7c3370', 'connection': 'close', 'content-length': '128', 'status': '500', 'vary': 'X-OpenStack-Manila-API-Version'}
        Body: {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
}}}

Traceback (most recent call last):
  File "/opt/stack/new/manila/manila_tempest_tests/tests/api/test_availability_zones.py", line 41, in test_list_availability_zones_core_api
    azs = self.shares_v2_client.list_availability_zones(version="2.7")
  File "/opt/stack/new/manila/manila_tempest_tests/services/share/v2/json/shares_client.py", line 524, in list_availability_zones
    resp, body = self.get(uri, extra_headers=True, version=version)
  File "/opt/stack/new/manila/manila_tempest_tests/services/share/v2/json/shares_client.py", line 65, in get
    return super(SharesV2Client, self).get(url, headers=headers)
  File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 274, in get
    return self.request('GET', url, extra_headers, headers)
  File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 639, in request
    resp, resp_body)
  File "/usr/local/lib/python2.7/dist-packages/tempest_lib/common/rest_client.py", line 753, in _error_checker
    message=message)
tempest_lib.exceptions.ServerFault: Got server fault
Details: The server has either erred or is incapable of performing the requested operation.

[1] http://logs.openstack.org/87/235887/7/check/gate-manila-tempest-dsvm-neutron-postgres/4bf0e97/logs/testr_results.html.gz

[2] http://paste.openstack.org/show/476512/ or http://logs.openstack.org/87/235887/7/check/gate-manila-tempest-dsvm-neutron-postgres/4bf0e97/logs/screen-m-api.txt.gz?level=TRACE#_2015-10-16_14_02_42_194

Changed in manila:
importance: Undecided → High
milestone: none → mitaka-1
tags: added: api db postgres
tags: added: liberty-backport-potential
description: updated
description: updated
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/236009

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

Reviewed: https://review.openstack.org/236009
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=8c165b378958b541c5578303612dc9efa84076e6
Submitter: Jenkins
Branch: master

commit 8c165b378958b541c5578303612dc9efa84076e6
Author: Valeriy Ponomaryov <email address hidden>
Date: Fri Oct 16 19:43:07 2015 +0300

    Fix list-availability-zones API for PostgreSQL

    Listing of availability zones using PostgreSQl does not work in Manila.
    It is caused by usage of not strict types comparison.
    So, fix it and add Tempest test for API.

    Change-Id: I21a064d60c4e1ccb6752ba6e220785f80bd1cb69
    Closes-Bug: #1506938

Changed in manila:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/236706

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/liberty)

Reviewed: https://review.openstack.org/236706
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=5de48a0daac4e82cee5376d2c8e57c1b0947a167
Submitter: Jenkins
Branch: stable/liberty

commit 5de48a0daac4e82cee5376d2c8e57c1b0947a167
Author: Valeriy Ponomaryov <email address hidden>
Date: Fri Oct 16 19:43:07 2015 +0300

    Fix list-availability-zones API for PostgreSQL

    Listing of availability zones using PostgreSQl does not work in Manila.
    It is caused by usage of not strict types comparison.
    So, fix it and add Tempest test for API.

    Change-Id: I21a064d60c4e1ccb6752ba6e220785f80bd1cb69
    Closes-Bug: #1506938
    (cherry picked from commit 8c165b378958b541c5578303612dc9efa84076e6)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0b1

This issue was fixed in the openstack/manila 2.0.0.0b1 development milestone.

Changed in manila:
status: Fix Committed → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 1.0.1

This issue was fixed in the openstack/manila 1.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/manila 1.0.1 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.