Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-25 Thread Amit Das
Thanks Mike for getting me these useful reviews & design discussions. So as it stands now, I am trying '*provider_id*' to map OpenStack/Cinder with the driver's backend storage. I got some useful review comments from @xing-yang to try out '*provider_id'* feature enabled by below commit: https://r

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-24 Thread Mike Perez
On 06:05 Sat 20 Dec , Duncan Thomas wrote: > No, I mean that if drivers are going to access database, then they should > do it via a defined interface that limits what they can do to a sane set of > operations. I'd still prefer that they didn't need extra access beyond the > model update, but I

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-20 Thread Amit Das
Got it Duncan. I will re-check if I can arrive at any solution without accessing the database. Regards, Amit *CloudByte Inc.* On Sat, Dec 20, 2014 at 7:35 PM, Duncan Thomas wrote: > No, I mean that if drivers are going to access database, then they should > do it vi

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-20 Thread Duncan Thomas
No, I mean that if drivers are going to access database, then they should do it via a defined interface that limits what they can do to a sane set of operations. I'd still prefer that they didn't need extra access beyond the model update, but I don't know if that is possible. Duncan Thomas On Dec

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-19 Thread Amit Das
Thanks Duncan. Do you mean hepler methods in the specific driver class? On 19 Dec 2014 14:51, "Duncan Thomas" wrote: > So our general advice has historical been 'drivers should not be accessing > the db directly'. I haven't had chance to look at your driver code yet, > I've been on vacation, but

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-19 Thread Mike Perez
On 01:20 Fri 19 Dec , Duncan Thomas wrote: > So our general advice has historical been 'drivers should not be accessing > the db directly'. I haven't had chance to look at your driver code yet, > I've been on vacation, but my suggestion is that if you absolutely must > store something in the ad

Re: [openstack-dev] [cinder] [driver] DB operations

2014-12-19 Thread Duncan Thomas
So our general advice has historical been 'drivers should not be accessing the db directly'. I haven't had chance to look at your driver code yet, I've been on vacation, but my suggestion is that if you absolutely must store something in the admin metadata rather than somewhere that is covered by t

[openstack-dev] [cinder] [driver] DB operations

2014-12-18 Thread Amit Das
Hi Stackers, 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 backe