Havana regression, host and service api no longer work with cells

Bug #1251043 reported by Sam Morrison
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Unassigned
Nominated for Havana by Qiu Yu

Bug Description

The host and service api no longer work with cells.
In cells a host and service ID is <cell routing path>@<ID>

This breaks the object type enforcement of the ID attribute being an int

Traceback (most recent call last):
  File "/opt/nova/nova/api/openstack/__init__.py", line 119, 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 "/usr/local/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 571, 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/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/nova/nova/api/openstack/wsgi.py", line 938, in __call__
    content_type, body, accept)
  File "/opt/nova/nova/api/openstack/wsgi.py", line 997, in _process_stack
    action_result = self.dispatch(meth, request, action_args)
  File "/opt/nova/nova/api/openstack/wsgi.py", line 1078, in dispatch
    return method(req=request, **action_args)
  File "/opt/nova/nova/api/openstack/compute/contrib/hosts.py", line 143, in index
    set_zones=True)
  File "/opt/nova/nova/compute/cells_api.py", line 489, in service_get_all
    services)
  File "/opt/nova/nova/objects/base.py", line 580, in obj_make_list
    **extra_args)
  File "/opt/nova/nova/objects/service.py", line 67, in _from_db_object
    service[key] = db_service[key]
  File "/opt/nova/nova/objects/base.py", line 395, in __setitem__
    setattr(self, name, value)
  File "/opt/nova/nova/objects/base.py", line 66, in setter
    return setattr(self, get_attrname(name), typefn(value))
ValueError: invalid literal for int() with base 10: 'api!compute@1'

Matt Riedemann (mriedem)
tags: added: cells unified-objects
Sean Dague (sdague)
Changed in nova:
importance: Undecided → High
status: New → Confirmed
zhangjialong (zhangjl)
Changed in nova:
assignee: nobody → zhangjialong (zhangjl)
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/76834

Changed in nova:
status: Confirmed → In Progress
description: updated
description: updated
Revision history for this message
zhangjialong (zhangjl) wrote :

Accoring to the view of Johannes Erdfelt, there is a bettter solution https://review.openstack.org/81282

Changed in nova:
assignee: zhangjialong (zhangjl) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/81282
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0df94733f7283cbc1e9ae7d27f5cd443158cae8e
Submitter: Jenkins
Branch: master

commit 0df94733f7283cbc1e9ae7d27f5cd443158cae8e
Author: Johannes Erdfelt <email address hidden>
Date: Tue Mar 18 07:33:51 2014 -0700

    Fix service API and cells

    The move to the object model broke the service API when used together
    with cells. The underlying problem is how cells will overload the id
    field with a cell path to uniquely identify each service in each cell.

    Changing the id to a string would defeat the purpose of the object model
    so this patch uses a proxy to modify the id on access to make the
    difference transparent to the API.

    Change-Id: I165b5d64b0c1556511eb02d179ca9fc6f101c008
    Closes-bug: 1251043

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
Qiu Yu (unicell)
tags: added: havana-backport-potential
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/89379

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/116764

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/havana)

Change abandoned by Qiu Yu (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/89379
Reason: Moved to https://review.openstack.org/#/c/116764/ for correct Change-Id

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Alan Pevec (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/116764
Reason: Final Havana release 2012.3.4 has been cut and stable/havana is going to be removed in a week.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.