Ask Your Question
0

can't create instance because cinder error

asked 2015-07-01 01:47:34 -0600

hao119119 gravatar image

updated 2015-07-01 03:48:32 -0600

Hi, i just use devstack to update my local openstack, but when i try to create an instance through horizion there is an error occurs. I follow the log and find these error in c-api.log, it seems like miss some property in snapshot.

2015-07-01 14:35:11.026 INFO cinder.api.openstack.wsgi [req-1b26bdcc-b548-49e8-8100-220f474b7d19 demo] GET http://10.12.11.118:8776/v2/8e5183cc5ae744af9ad6bca9ce3103d0/snapshots/detail?alltenants=1&tenant_id=8e5183cc5ae744af9ad6bca9ce3103d0 (http://10.12.11.118:8776/v2/8e5183cc5...)

2015-07-01 14:35:11.026 DEBUG cinder.api.openstack.wsgi [req-1b26bdcc-b548-49e8-8100-220f474b7d19 demo] Empty body provided in request get_body /opt/stack/cinder/cinder/api/openstack/wsgi.py:859

2015-07-01 14:35:11.028 ERROR cinder.api.middleware.fault [req-1b26bdcc-b548-49e8-8100-220f474b7d19 demo] Caught error: Entity '<class 'cinder.db.sqlalchemy.models.snapshot'="">' has no property 'alltenants'

2015-07-01 14:35:11.028 INFO cinder.api.middleware.fault [req-1b26bdcc-b548-49e8-8100-220f474b7d19 demo] http://10.12.11.118:8776/v2/8e5183cc5ae744af9ad6bca9ce3103d0/snapshots/detail?alltenants=1&tenant_id=8e5183cc5ae744af9ad6bca9ce3103d0 (http://10.12.11.118:8776/v2/8e5183cc5...) returned with HTTP 500

2015-07-01 14:35:11.029 INFO eventlet.wsgi.server [req-1b26bdcc-b548-49e8-8100-220f474b7d19 demo] 10.12.11.118 - - [01/Jul/2015 14:35:11] "GET /v2/8e5183cc5ae744af9ad6bca9ce3103d0/snapshots/detail?alltenants=1&tenant_id=8e5183cc5ae744af9ad6bca9ce3103d0 HTTP/1.1" 500 425 0.006225

as i try to follow the code, i think i found some error in it

in the SnapshotsController._item function

search_opts = req.GET.copy()

the value of search_opts is like this MultiDict([(u'alltenants', u'1'), (u'tenant_id', u'6889d9c31549458b83a4316e97181e71')])

but when the search_opts pass to the API.get_all_snapshots, it try to check the search_opts like

 if (context.is_admin and 'all_tenants' in search_opts):
            # Need to remove all_tenants to pass the filtering below.
            del search_opts['all_tenants']
            snapshots = objects.SnapshotList.get_all(context,
                                                     search_opts)
        else:
            snapshots = objects.SnapshotList.get_all_by_project(
                context, context.project_id, search_opts)

so the code can never get in to the if condition, and finally the filter error in sqlalchemy/api.py snapshot_get_all_by_project

if filters:
        query = query.filter_by(**filters)

so what i should do now, is it a bug or just something wrong in my envrimoment? please tell me, thanks a lot

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2015-07-01 04:48:44 -0600

Prateek.1248 gravatar image

updated 2015-07-01 04:56:51 -0600

looks like a bug
vi /opt/stack/horizon/openstack_dashboard/usage/quotas.py
def _get_tenant_volume_usages(request, usages, disabled_quotas, tenant_id):
      if 'volumes' not in disabled_quotas:
           if tenant_id:
                      opts = {'alltenants': 1, 'tenant_id': tenant_id} # <--- this is where the bug is..
                      # # In above if you change alltenants to all_tenants then all works fine..

edit flag offensive delete link more

Comments

thanks a lot, i found it too. i don't know how to report it, could you help me? thanks a lot

hao119119 gravatar imagehao119119 ( 2015-07-01 10:16:37 -0600 )edit

there is already one reported..
https://bugs.launchpad.net/heat-trans...

Prateek.1248 gravatar imagePrateek.1248 ( 2015-07-01 14:04:09 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-07-01 01:47:34 -0600

Seen: 413 times

Last updated: Jul 01 '15