Erroneous limit parameter not included in error message for neutron port-list --limit

Bug #1649665 reported by rick jones
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Brian Haley

Bug Description

Running a "previously happy on Mitaka" cleanup script which included a:

neutron port-list --all-tenants --limit -1

command now returns an error under Newton:

stack@np-cp1-c0-m1-mgmt:~/rjones2$ neutron port-list --all-tenants --limit -1
Bad limit request: Limit must be an integer 0 or greater and not '%d'.
Neutron server returns request_ids: ['req-27f59b03-d063-4bd2-a84f-43a6545c1f41']

Independent of whether the command should still accept a -1, it would seem the error message is in error - the percent-d should be the value provided to the --limit option. Looking at https://github.com/openstack/neutron/blob/master/neutron/api/api_common.py one can see that "limit" is not added to msg in _get_limit_param.

tags: added: low-hanging-fruit
Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
Changed in neutron:
assignee: nobody → Saisrikiran Mudigonda (saisrikiran-mudigonda)
Changed in neutron:
assignee: Saisrikiran Mudigonda (saisrikiran-mudigonda) → Brian Haley (brian-haley)
status: Confirmed → In Progress
Revision history for this message
Brian Haley (brian-haley) wrote :

https://review.openstack.org/#/c/410375/ has already been posted for this.

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/411934

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

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/411935

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

Reviewed: https://review.openstack.org/410375
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e45d2a904d76e840a55b15d8f94a548a35e5969b
Submitter: Jenkins
Branch: master

commit e45d2a904d76e840a55b15d8f94a548a35e5969b
Author: Brian Haley <email address hidden>
Date: Tue Dec 13 14:35:26 2016 -0500

    Correctly print --limit value passed via API

    Passing an invalid limit value, for example '--limit -1'
    in neutronclient, generates this error from the API:

      Bad limit request: Limit must be an integer 0 or
      greater and not '%d'.

    It should print what was passed.

    Closes-bug: #1649665

    Change-Id: I9b8bd67d344cd91e008f7c897f1ea6a020a9c30b

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/newton)

Reviewed: https://review.openstack.org/411934
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=b4a596d8a32ce9b89774b2879844f8ed18ff206c
Submitter: Jenkins
Branch: stable/newton

commit b4a596d8a32ce9b89774b2879844f8ed18ff206c
Author: Brian Haley <email address hidden>
Date: Tue Dec 13 14:35:26 2016 -0500

    Correctly print --limit value passed via API

    Passing an invalid limit value, for example '--limit -1'
    in neutronclient, generates this error from the API:

      Bad limit request: Limit must be an integer 0 or
      greater and not '%d'.

    It should print what was passed.

    Closes-bug: #1649665

    (cherry picked from commit e45d2a904d76e840a55b15d8f94a548a35e5969b)

    Change-Id: I9b8bd67d344cd91e008f7c897f1ea6a020a9c30b

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/mitaka)

Reviewed: https://review.openstack.org/411935
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=4e77829429935f4e6a5be4b260611477b7236d04
Submitter: Jenkins
Branch: stable/mitaka

commit 4e77829429935f4e6a5be4b260611477b7236d04
Author: Brian Haley <email address hidden>
Date: Tue Dec 13 14:35:26 2016 -0500

    Correctly print --limit value passed via API

    Passing an invalid limit value, for example '--limit -1'
    in neutronclient, generates this error from the API:

      Bad limit request: Limit must be an integer 0 or
      greater and not '%d'.

    It should print what was passed.

    Closes-bug: #1649665

    (cherry picked from commit e45d2a904d76e840a55b15d8f94a548a35e5969b)

    Change-Id: I9b8bd67d344cd91e008f7c897f1ea6a020a9c30b

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.0.0b3

This issue was fixed in the openstack/neutron 10.0.0.0b3 development milestone.

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

This issue was fixed in the openstack/neutron 9.2.0 release.

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

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