A network can't be disassociated from a project

Bug #1171284 reported by Haiwei Xu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Christopher Yeoh
Grizzly
Fix Released
Medium
Matt Riedemann

Bug Description

In vlan mode when I tried to disassociate a network from a project with " nova network-disassociate", I got the error as follows:

$ nova network-disassociate f40cf324-15ee-42be-8e1d-b590675aafcc
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-cd1c726b-d06e-49d8-a948-24e2e453439a)

2013-04-22 02:37:53 ERROR [nova.api.openstack] Caught error: 'project'
Traceback (most recent call last):
  File "/opt/stack/nova/nova/api/openstack/__init__.py", line 81, in __call__
    return req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 899, in __call__
    content_type, body, accept)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 951, in _process_stack
    action_result = self.dispatch(meth, request, action_args)
  File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1030, in dispatch
    return method(req=request, **action_args)
  File "/opt/stack/nova/nova/api/openstack/compute/contrib/os_networks.py", line 77, in _disassociate_host_and_project
    self.network_api.associate(context, id, host=None, project=None)
  File "/opt/stack/nova/nova/network/api.py", line 90, in wrapped
    return func(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/network/api.py", line 366, in associate
    project = associations['project']
KeyError: 'project'
2013-04-22 02:37:53 INFO [nova.api.openstack] http://192.168.1.100:8774/v2/c619271b17564eed8fbb17570492d2d3/os-networks/f40cf324-15ee-42be-8e1d-b590675aafcc/action returned with HTTP 500

Tags: network
Haiwei Xu (xu-haiwei)
Changed in nova:
assignee: nobody → Haiwei Xu (xu-haiwei)
Changed in nova:
status: New → Confirmed
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/28497

Changed in nova:
assignee: Haiwei Xu (xu-haiwei) → Christopher Yeoh (cyeoh-0)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/28497
Committed: http://github.com/openstack/nova/commit/6cfc02531f92c2e98eb947bc7a46d6bed0158d82
Submitter: Jenkins
Branch: master

commit 6cfc02531f92c2e98eb947bc7a46d6bed0158d82
Author: Chris Yeoh <email address hidden>
Date: Wed May 8 12:33:29 2013 +0930

    Fixes KeyError bug with network api associate

    Fixes bug in network api associate function where it would always
    raise a KeyError when associating or disassociating a project.

    Fixes bug 1171284

    Change-Id: Iae0e57e0a961b8a3377b38dad72094188755a3e8

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Michael Still (mikal)
tags: added: grizzly-backport-potential
Revision history for this message
Igor Laskovy (igor-laskovy) wrote :

Hi all!
When can expect this Fix at CloudArchive repository for Grizzly release?

Revision history for this message
Matt Riedemann (mriedem) wrote :

I'm working on backporting this to stable/grizzly now.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/48300

Matt Riedemann (mriedem)
tags: removed: grizzly-backport-potential
tags: added: network
tags: added: grizzly-backport-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/48300
Committed: http://github.com/openstack/nova/commit/9f71aa7b5216e1b1904cdbd5c42171f21e93f9f1
Submitter: Jenkins
Branch: stable/grizzly

commit 9f71aa7b5216e1b1904cdbd5c42171f21e93f9f1
Author: Chris Yeoh <email address hidden>
Date: Wed May 8 12:33:29 2013 +0930

    Fixes KeyError bug with network api associate

    Fixes bug in network api associate function where it would always
    raise a KeyError when associating or disassociating a project.

    Fixes bug 1171284

    Conflicts:

     nova/tests/network/test_api.py

    Change-Id: Iae0e57e0a961b8a3377b38dad72094188755a3e8
    (cherry picked from commit 6cfc02531f92c2e98eb947bc7a46d6bed0158d82)

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
Changed in nova:
importance: Undecided → Medium
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.