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

Bug #1835925 reported by Robert Varjasi
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Takashi Natsume
Queens
Fix Committed
Undecided
Takashi Natsume
Rocky
Fix Committed
Undecided
Takashi Natsume
Stein
Fix Committed
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
tags: added: api
Changed in nova:
assignee: nobody → Takashi NATSUME (natsume-takashi)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/670440

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

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/676026

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/676027

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/676028

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

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)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

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

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

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)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.3

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.2.3

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

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

Reviewed: https://review.opendev.org/676028
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d74d764c1561dbea2759db9930a7ce9f3f8cc5b7
Submitter: Zuul
Branch: stable/queens

commit d74d764c1561dbea2759db9930a7ce9f3f8cc5b7
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)
    (cherry picked from commit 7b216e08cfa2c2a39c2dad378d67ab0114312326)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.13

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