Network extension returns integer id but expects uuid

Bug #977712 reported by Vish Ishaya on 2012-04-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Vish Ishaya

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 -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/", line 252, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/opt/stack/nova/nova/network/", line 258, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/opt/stack/nova/nova/network/", line 1543, in get_network\n networks = self._get_networks_by_uuids(context, [network_uuid])\n', u' File "/opt/stack/nova/nova/network/", 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/", 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/", line 111, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/", 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)

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 lands)
     * Fixes bug 977712
     * Fixes bug 977723

    Change-Id: I6aa815960782c7ae5165aeebd83bdaaa62c19b04

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar) on 2012-05-22
Changed in nova:
milestone: none → folsom-1
Thierry Carrez (ttx) on 2012-05-23
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-09-27
Changed in nova:
milestone: folsom-1 → 2012.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers