Return 200 when execute router-list-on-l3-agent api with incorrect agent_id

Bug #1413500 reported by Hirofumi Ichihara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Hirofumi Ichihara

Bug Description

Neutron server return HTML code 200 when users execute router-list-on-l3-agent with incorrect agent_id.
Users expect to return HTML code 404.

$ neutron agent-list
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+
| 21b32f05-df03-4ecf-a0cb-b5e4d6a83397 | DHCP agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-dhcp-agent |
| 5d1cc93d-026d-41f7-8608-e9b14e254036 | Open vSwitch agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-openvswitch-agent |
| 88cb8c8e-43c4-47da-9453-be1908328cd6 | L3 agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-l3-agent |
| f6eb352e-d374-4f98-86ed-e7571787336c | Metadata agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-metadata-agent |
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+

I executed API with "hoge" as incorrect agent_id.
$ curl -i -X GET http://192.168.0.4:9696/v2.0/agents/hoge/l3-routers.json -H "Accept: application/json" -H "X-Auth-Token: 6b243da4b7414a65b12567df817f6f6c"
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 15
X-Openstack-Request-Id: req-8a12b884-e5dd-4f50-ba21-b4823861e915
Date: Thu, 22 Jan 2015 08:01:39 GMT

{"routers": []}

Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

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

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

commit 8dde08679902149576a9173ebda3f847e65c964f
Author: Hirofumi Ichihara <email address hidden>
Date: Fri Jan 23 17:30:53 2015 +0900

    Return 404 when executing router-list-on-l3-agent with invalid agent_id

    Neutron server returns HTML code 200 when users execute
    router-list-on-l3-agent with invalid agent_id.
    Users expect HTML code 404 to be returned.

    Change-Id: Ifadca8d6573a94abc3580a0de4463b755ef12a24
    Closes-bug: 1413500

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-3 → 2015.1.0
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.