services contrib extension fails with 'Service' object has no attribute 'availability_zone'

Bug #1099399 reported by Michael Fork
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

GET against /os-services with latest devstack fails with

2013-01-14 13:39:32.65 ERROR nova.api.openstack [req-fbf380f3-fba8-4f17-9201-e5b7519a5758 admin demo] Caught error: 'Service' object has no attribute 'availability_zone'
2013-01-14 13:39:32.65 TRACE nova.api.openstack Traceback (most recent call last):
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/__init__.py", line 81, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return req.get_response(self.application)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
2013-01-14 13:39:32.65 TRACE nova.api.openstack application, catch_exc_info=False)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
2013-01-14 13:39:32.65 TRACE nova.api.openstack app_iter = application(self.environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 329, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return self.app(env, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack response = self.app(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return resp(environ, start_response)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack resp = self.call_func(req, *args, **self.kwargs)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
2013-01-14 13:39:32.65 TRACE nova.api.openstack return self.func(req, *args, **kwargs)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 895, in __call__
2013-01-14 13:39:32.65 TRACE nova.api.openstack content_type, body, accept)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 951, in _process_stack
2013-01-14 13:39:32.65 TRACE nova.api.openstack action_result = self.dispatch(meth, request, action_args)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 1040, in dispatch
2013-01-14 13:39:32.65 TRACE nova.api.openstack return method(req=request, **action_args)
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/api/openstack/compute/contrib/services.py", line 95, in index
2013-01-14 13:39:32.65 TRACE nova.api.openstack 'zone': svc['availability_zone'],
2013-01-14 13:39:32.65 TRACE nova.api.openstack File "/opt/stack/nova/nova/db/sqlalchemy/models.py", line 64, in __getitem__
2013-01-14 13:39:32.65 TRACE nova.api.openstack return getattr(self, key)
2013-01-14 13:39:32.65 TRACE nova.api.openstack AttributeError: 'Service' object has no attribute 'availability_zone'
2013-01-14 13:39:32.65 TRACE nova.api.openstack

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/19626

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

Reviewed: https://review.openstack.org/19626
Committed: http://github.com/openstack/nova/commit/20ba7028fc406509c5f8430f79f7153f359d87af
Submitter: Jenkins
Branch: master

commit 20ba7028fc406509c5f8430f79f7153f359d87af
Author: Michael J Fork <email address hidden>
Date: Mon Jan 14 13:45:23 2013 +0000

    Populate service list with availability zone

    Fixes bug 1099399

    Availability zone was removed from the service object and is now added
    via a separate call to availabilty_zones.set_availability_zones

    Change-Id: I89126bb72e482f3ce701a9e28035416805a639a0

Changed in nova:
status: In Progress → Fix Committed
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/19668

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

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

commit fc42f76b24df376c89f94a177f2476dacbc87073
Author: Michael J Fork <email address hidden>
Date: Tue Jan 15 12:44:41 2013 +0000

    Populate service list with availability zone and correct unit test

    Availability zone was removed from the service object and is now added
    via a separate call to availabilty_zones.set_availability_zones. Fix
    the fake_services_list structure in test_services to reflect that
    availability zone is no longer returned but added separately based
    on the topic.

    NOTE: original fix was reverted, combining unit test fix and original
    change here.

    bug 1099399
    Change-Id: Ic9675a88c2c229d6feb20f5b934458e10c17684f

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