nova flavor-list --sort-key failed with 'disk' and 'ephemeral' keys

Bug #1835925 reported by Robert Varjasi on 2019-07-09
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Takashi NATSUME
Queens
Undecided
Takashi NATSUME
Rocky
Undecided
Takashi NATSUME
Stein
Undecided
Takashi NATSUME

Bug Description

nova flavor-list --sort-key disk
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'oslo_db.exception.InvalidSortKey'> (HTTP 500) (Request-ID: req-b9a26186-de30-4e89-9dce-013f3558c25f)

nova flavor-list --sort-key ephemeral
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'oslo_db.exception.InvalidSortKey'> (HTTP 500) (Request-ID: req-6dcb185d-aa30-4956-a3c9-47cdabdfaec3)

packages Installed with Openstack-Ansible 17.1.3:

python-novaclient (10.1.0)
nova (17.0.7.dev28)
nova --version
10.1.0

nova-api-wsgi log:
 Unexpected exception in API method: InvalidSortKey: Sort key supplied is invalid: disk
Jul 9 17:47:41 controller3-nova-api-container-bf07ee54 nova-api-wsgi: 2019-07-09 17:47:32.524 21583 ERROR nova.api.openstack.wsgi raise exception.InvalidSortKey(current_sort_key)
Jul 9 17:47:41 controller3-nova-api-container-bf07ee54 nova-api-wsgi: 2019-07-09 17:47:32.583 21583 INFO nova.api.openstack.wsgi [req-aa0a04a6-4d37-48fe-8cb7-78df01521f13 da2ee42cc00545aaa3018c6d8976b122 3d67bbf25bc24ffb9acacf775eca7f20 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

Tags: api Edit Tag help
tags: added: api
Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
status: New → In Progress

Reviewed: https://review.opendev.org/670440
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ae7ebdf45eb6c9c4406d851ab8ee6f2e47d5f275
Submitter: Zuul
Branch: master

commit ae7ebdf45eb6c9c4406d851ab8ee6f2e47d5f275
Author: Takashi NATSUME <email address hidden>
Date: Fri Jul 12 12:29:49 2019 +0900

    Retrun 400 if invalid query parameters are specified

    The following APIs return 500 error currently
    if an invalid sort key or an invalid sort direction
    query parameter is specified.

    - GET /flavors
    - GET /flavors/detail

    Make the APIs return 400 error in that case.

    Change-Id: I1d6d2c1f734b28dbea5c67cf88717149dd4911d7
    Closes-Bug: #1835925

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.opendev.org/676026
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d7e4e47d57c13bb6944ce3af0d16361f1129078a
Submitter: Zuul
Branch: stable/stein

commit d7e4e47d57c13bb6944ce3af0d16361f1129078a
Author: Takashi NATSUME <email address hidden>
Date: Fri Jul 12 12:29:49 2019 +0900

    Retrun 400 if invalid query parameters are specified

    The following APIs return 500 error currently
    if an invalid sort key or an invalid sort direction
    query parameter is specified.

    - GET /flavors
    - GET /flavors/detail

    Make the APIs return 400 error in that case.

    Change-Id: I1d6d2c1f734b28dbea5c67cf88717149dd4911d7
    Closes-Bug: #1835925
    (cherry picked from commit ae7ebdf45eb6c9c4406d851ab8ee6f2e47d5f275)

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

Reviewed: https://review.opendev.org/676027
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7b216e08cfa2c2a39c2dad378d67ab0114312326
Submitter: Zuul
Branch: stable/rocky

commit 7b216e08cfa2c2a39c2dad378d67ab0114312326
Author: Takashi NATSUME <email address hidden>
Date: Fri Jul 12 12:29:49 2019 +0900

    Retrun 400 if invalid query parameters are specified

    The following APIs return 500 error currently
    if an invalid sort key or an invalid sort direction
    query parameter is specified.

    - GET /flavors
    - GET /flavors/detail

    Make the APIs return 400 error in that case.

    Change-Id: I1d6d2c1f734b28dbea5c67cf88717149dd4911d7
    Closes-Bug: #1835925
    (cherry picked from commit ae7ebdf45eb6c9c4406d851ab8ee6f2e47d5f275)
    (cherry picked from commit d7e4e47d57c13bb6944ce3af0d16361f1129078a)

This issue was fixed in the openstack/nova 19.0.3 release.

This issue was fixed in the openstack/nova 18.2.3 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers