As I mentioned, setting the proper permissions would allow to cast all tenant's volume to a backend, but wouldn't allow to filter based on the volume size. There's no filters that does that today. An idea that could be used is what is used in the json_filter. It allows the user to set a rules like:
cinder create --os-volume-api-version --hint query='[">=","$free_capacity_gb",500]' vol1 But this does not allow to filter based in the volume's properties. Furthermore, the admin can not make that mandatory for the tenant (not that I know of). If the tenant does not set the 'hint', the request will follow the default rules. If Cinder supported a filter definition in the backend configuration, like Brent posted, that would be very useful (I have already being asked about a similar request). On Sun, Mar 20, 2016 at 2:00 PM, John Griffith <john.griffi...@gmail.com> wrote: > > > On March 19, 2016 at 19:13:33, Erlon Cruz (sombra...@gmail.com) wrote: >> >> Hi Brent, >> >> Unfortunately that is not possible. The feature mentioned by Vahric, >> driver_filter, is a 'driver' custom filter capability. I.e., the vendor >> driver must implement that in order to be possible to use (surely, nothing >> holds you from implementing in the driver if your vendor does not supports >> it). You are trying to filter based in the volume size, the exiting >> filters, filter based in the host's available size not the volume. >> >> About the tenant filtering, the closest solution I can think of is is you >> create a volume type associated with the backend you want to cast volumes o >> the tenant, and then remove the permissions of all other available >> volume-types so, the tenant only sees that volume type. >> >> Can you give the reason why you need to filter like that? This could be a >> good addition to future Cinder features. >> >> Erlon >> >> On Thu, Feb 25, 2016 at 7:57 PM, Brent Troge <brenttroge2...@gmail.com> >> wrote: >> >>> yeah, i have read through those, plus i did some reading through the >>> actual code of all kilo/stable cinder filters >>> >>> i any case i think i have a good path forward, just need to start >>> testing to understand this a bit more. >>> >>> thanks for taking the time to assist. >>> >>> >>> On Thu, Feb 25, 2016 at 9:13 AM, Vahric Muhtaryan <vah...@doruk.net.tr> >>> wrote: >>> >>>> I found this >>>> >>>> >>>> http://docs.openstack.org/admin-guide-cloud/blockstorage-driver-filter-weighing.html >>>> >>>> And this >>>> >>>> >>>> https://blueprints.launchpad.net/cinder/+spec/filtering-weighing-with-driver-supplied-functions >>>> >>>> From: Brent Troge <brenttroge2...@gmail.com> >>>> Date: Thursday 25 February 2016 at 16:17 >>>> To: "openstack@lists.openstack.org" <openstack@lists.openstack.org> >>>> Subject: [Openstack] Cinder Multiple Backends - Filter On Tenant >>>> >>>> I need the cinder filter to support directing volumes to a specific >>>> backend based on tenant id and volume size. >>>> >>>> Something like: >>>> >>>> # tenant specific backend >>>> [backend-1] >>>> filter = (volume_size > 100G) && (tenant_id == abc123) >>>> >>>> # all others >>>> [backend-2] >>>> filter = (volume_size < 100G) >>>> >>>> >>>> >>>> Is this possible with the current set of kilo stable cinder filters ? >>>> >>>> Thanks in advance. >>>> >>>> >>>> _______________________________________________ Mailing list: >>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to >>>> : openstack@lists.openstack.org Unsubscribe : >>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >>>> >>> >>> >>> _______________________________________________ >>> Mailing list: >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >>> Post to : openstack@lists.openstack.org >>> Unsubscribe : >>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >>> >>> >> _______________________________________________ >> Mailing list: >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >> Post to : openstack@lists.openstack.org >> Unsubscribe : >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack >> >> Hi Erlon, > > Cinder has the ability to set access rights on Volume Types. I haven't > looked at it in a while, but what you could do is set the type up based on > the backend, and then apply access to the tenant you want there. > > One thing I guess we'd need to consider is different default types > per/tenant which seems like it would be a useful feature if there's not > already a way to make it work. > > John > >
_______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : openstack@lists.openstack.org Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack