Return 200 when execute net-list-on-dhcp-agent api with incorrect agent_id

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

Bug Description

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

I have already finished l3agent fix[1].

[1]: https://review.openstack.org/#/c/149531/

$ neutron agent-list
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+
| id | agent_type | host | alive | admin_state_up | binary |
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+
| 2343d3b3-c150-43e7-a9e8-8bf9425a1272 | DHCP agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-dhcp-agent |
| 3b9f0e0c-0c0d-4c7f-a057-b8ff2e0331e0 | Open vSwitch agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-openvswitch-agent |
| 41206a6f-8b8f-49e0-bc28-50b55b8df22e | Metadata agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-metadata-agent |
| 96ed22b2-c49e-4541-9214-5725aa469272 | L3 agent | vagrant-ubuntu-trusty-64.localdomain | :-) | True | neutron-l3-agent |
+--------------------------------------+--------------------+--------------------------------------+-------+----------------+---------------------------+

$ curl -i -X GET http://127.0.0.1:9696/v2.0/agents/hoge/dhcp-networks.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: 95b769a44af64bf8a9ed769f05a83c8e"
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 16
X-Openstack-Request-Id: req-d0d02a71-cbb2-4190-8198-efe3087966cb
Date: Tue, 24 Feb 2015 15:37:36 GMT

{"networks": []}

Changed in neutron:
assignee: nobody → Hirofumi Ichihara (ichihara-hirofumi)
Revision history for this message
Oleg Bondarev (obondarev) wrote :

Marking as higt as it's needed for API consistency

Changed in neutron:
status: New → Confirmed
importance: Undecided → High
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/159046

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

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

commit dc4268b8547ba9416c3c1de4fb41597ab9d5a6df
Author: Hirofumi Ichihara <email address hidden>
Date: Wed Feb 25 18:02:35 2015 +0900

    Return 404 when executing net-list-on-dhcp-agent with invalid agent_id

    Neutron server returns HTTP code 200 when users execute
    net-list-on-dhcp-agent with invalid agent_id.
    Users expect HTTP code 404 to be returned.

    Change-Id: I41652a9bf4a81835abb6646ea870781472757623
    Closes-bug: 1425138

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.