[openstack-dev] [cinder] [driver] DB operations
amit.das at cloudbyte.com
Fri Dec 19 07:41:00 UTC 2014
I have been developing a Cinder driver for CloudByte storage and have come
across some scenarios where the driver needs to do create, read & update
operations on cinder database (volume_admin_metadata table). This is
required to establish a mapping between OpenStack IDs with the backend
Now, I have got some review comments w.r.t the usage of DB related
operations esp. w.r.t raising the context to admin.
In short, it has been advised not to use "*context.get_admin_context()*".
However, i get errors trying to use the default context as shown below:
*2014-12-19 12:18:17.880 TRACE oslo.messaging.rpc.dispatcher File
"/opt/stack/cinder/cinder/db/sqlalchemy/api.py", line 103, in
*2014-12-19 12:18:17.880 TRACE oslo.messaging.rpc.dispatcher return
*2014-12-19 12:18:17.880 TRACE oslo.messaging.rpc.dispatcher
AttributeError: 'module' object has no attribute 'is_admin'*
So what is the proper way to run these DB operations from within a driver ?
*CloudByte Inc.* <http://www.cloudbyte.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev