Network extension returns integer id but expects uuid

Bug #977712 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Vish Ishaya
Essex
Fix Released
Undecided
Unassigned

Bug Description

The os-netwoks extension returns a network with an integer id, but show and action expect a uuid when looking up the network, resulting in an error when the id is specified:

curl -X GET http://192.168.27.100:8774/v2/2f30bd0fa67a4d0e88cb5d2a7a42b1ef/os-networks/1 -H 'x-auth-token: 2ac6872c417c4756b7fb9930ad5799d4' -H 'accept: application/json'

{"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
2012-04-10 04:39:31 TRACE nova.api.openstack RemoteError: Remote error: NoNetworksFound No networks defined.
2012-04-10 04:39:31 TRACE nova.api.openstack [u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/rpc/amqp.py", line 252, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/opt/stack/nova/nova/network/manager.py", line 258, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/opt/stack/nova/nova/network/manager.py", line 1543, in get_network\n networks = self._get_networks_by_uuids(context, [network_uuid])\n', u' File "/opt/stack/nova/nova/network/manager.py", line 1533, in _get_networks_by_uuids\n return self.db.network_get_all_by_uuids(context, network_uuids)\n', u' File "/opt/stack/nova/nova/db/api.py", line 765, in network_get_all_by_uuids\n return IMPL.network_get_all_by_uuids(context, network_uuids, project_id)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 111, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 1954, in network_get_all_by_uuids\n raise exception.NoNetworksFound()\n', u'NoNetworksFound: No networks defined.\n'].

Changed in nova:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Vish Ishaya (vishvananda)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/6396
Committed: http://github.com/openstack/nova/commit/a0e37c6d29c57cde416b047cd38c93b6a9588005
Submitter: Jenkins
Branch: master

commit a0e37c6d29c57cde416b047cd38c93b6a9588005
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Apr 9 22:11:10 2012 -0700

    Fix errors in os-networks extension

     * Makes sure the uuid is returned as id if it exists
     * Simplifies db get for manager.get_networks
     * Removes direct db access from manager which was breaking test
     * Updates tests to verify the new logic
     * Makes sure Remote NotFounds are turned into 404s
       (The RemoteError blocks can be removed once
        https://review.openstack.org/5749 lands)
     * Fixes bug 977712
     * Fixes bug 977723

    Change-Id: I6aa815960782c7ae5165aeebd83bdaaa62c19b04

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/essex)

Fix proposed to branch: stable/essex
Review: https://review.openstack.org/6428

Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
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.