Network api changed, deprecated api not kept compatable

Bug #1134512 reported by Jason Kölker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Jason Kölker

Bug Description

 [instance: 21d1fcc0-0afa-45c6-84e9-d99a0d2687e2] Instance failed network setup
Traceback (most recent call last):
File "/opt/rackstack/146.0/nova/lib/python2.6/site-packages/nova-2013.1.a4291.g9c0881a-py2.6.egg/nova/compute/manager.py", line 1097, in _allocate_network security_groups=security_groups)
File "/opt/rackstack/146.0/nova/lib/python2.6/site-packages/nova-2013.1.a4291.g9c0881a-py2.6.egg/nova/network/api_deprecated.py", line 89, in wrapped
  return func(self, context, *args, **kwargs)
File "/opt/rackstack/146.0/nova/lib/python2.6/site-packages/nova-2013.1.a4291.g9c0881a-py2.6.egg/nova/network/api_deprecated.py", line 48, in wrapper
    res = f(self, context, *args, **kwargs)
TypeError: allocate_for_instance() got an unexpected keyword argument 'conductor_api'

Since its deprecated, i'm thinking of just throwing in kwargs to eat any params that come in

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Seems reasonable. Might want to check if there are other places that have added params/methods and add a quick test. I think a few other methods got a conductor_api parameter added.

Changed in nova:
status: New → Triaged
importance: Undecided → High
milestone: none → grizzly-rc1
Revision history for this message
Jason Kölker (jason-koelker) wrote :

https://github.com/jkoelker/nova/commit/0d511a8abc6fe3f3d6c82bfd8a1b761541b5fc65

Currently getting it run through our qa, env. Soon as its good, I'll gerrit it..

Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
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/23208

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

Reviewed: https://review.openstack.org/23208
Committed: http://github.com/openstack/nova/commit/94bf63da0d4a0fc7775e65627e5908de8a17b29e
Submitter: Jenkins
Branch: master

commit 94bf63da0d4a0fc7775e65627e5908de8a17b29e
Author: Jason Kölker <email address hidden>
Date: Wed Feb 27 11:01:50 2013 -0600

    Fix deprecated network api

    The rpc-only network api is deprecated in Grizzly, but it should still
    be able to function.

    Change summary:
    * Remove update_cache kwyword argument to get_instance_network_info
    * Add conductor_api keyword argument to get_instance_network_info
    * Add blanket **kwargs for future compat to get_instance_network_info
    * Pass instance['uuid'] as instance_id kwarg in _get_instance_nw_info
    * Add conductor_api keyword argument to remove_fixed_ip_from_instance
      and add_fixed_ip_to_instance
    * Add blanket **kwargs for future compat to remove_fixed_ip_from_instance
      and add_fixed_ip_to_instance
    * Pass empty rxtx_factor in remove_fixed_ip_from_instance and
      add_fixed_ip_to_instance for rpcapi compat
    * Add blanket **kwargs for future compat to deallocate_for_instance
    * Add conductor_api and security_groups to allocate_for_instance
    * Add blanket **kwargs for future compat to allocate_for_instance
    * Pass instance['uuid'] as instance_id kwarg in allocate_for_instance

    Fix Bug 1134512

    Change-Id: I6791df1bf1ac2456c5e83ec5ae47b0226409cf95

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.