Hi Josh, >> Given that Trove currently only supports a single datastore deployment per >> control system, does the current work also allow for a default type/version >> to be defined so that operators of Trove can set this as a property to >> maintain the current API compatibility/behavior?
Yes, the current pull request to support this allows for a default type, which, if there is only a single version for that type in the Trove infrastructure database, means that the existing behavior would be preserved. However as soon as an operator adds more than one datastore version of the default type then API users would need to always include the version ID. This would be fixed by recommendation #4 in my original message. Thanks, Tim ________________________________ From: Josh Odom [josh.o...@rackspace.com] Sent: Friday, October 18, 2013 3:16 PM To: OpenStack Development Mailing List Subject: Re: [openstack-dev] [Trove] How users should specify a datastore type when creating an instance Hi Tim, I do think your recommendation in 3 & 4 makes a lot of sense and improves the usability of the API. Given that Trove currently only supports a single datastore deployment per control system, does the current work also allow for a default type/version to be defined so that operators of Trove can set this as a property to maintain the current API compatibility/behavior? Josh From: Tim Simpson <tim.simp...@rackspace.com<mailto:tim.simp...@rackspace.com>> Reply-To: OpenStack Development Mailing List <openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>> Date: Friday, October 18, 2013 2:30 PM To: "openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>" <openstack-dev@lists.openstack.org<mailto:openstack-dev@lists.openstack.org>> Subject: [openstack-dev] [Trove] How users should specify a datastore type when creating an instance Hello fellow Trovians, There has been some good work recently to figure out a way to specify a specific datastore when using Trove. This is essential to supporting multiple datastores from the same install of Trove. I have an issue with some elements of the proposed solution though, so I decided I'd start a thread here so we could talk about it. As a quick refresher, here is the blue print for this work (there are some gists ammended to the end but I figured the mailing list would be an easier venue for discussion): https://wiki.openstack.org/wiki/Trove/trove-versions-types One issue I have is with the way the instance create call will change to support different data stores. For example, here is the post call: """ { "instance" : { "flavorRef" : "2", "name" : "as", "datastore_type" : "e60153d4-8ac4-414a-ad58-fe2e0035704a", "datastore_version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b", "volume" : { "size" : "1" } } } """ 1. I think since we have two fields in the instance object we should make a new object for datastore and avoid the name prefixing, like this: """ { "instance" : { "flavorRef" : "2", "name" : "as", "datastore": { "type" : "e60153d4-8ac4-414a-ad58-fe2e0035704a", "version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b" } "volume" : { "size" : "1" } } } """ 2. I also think a datastore_version alone should be sufficient since the associated datastore type will be implied: """ { "instance" : { "flavorRef" : "2", "name" : "as", "datastore": { "version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b" } "volume" : { "size" : "1" } } } """ 3. Additionally, while a datastore_type should have an ID in the Trove infastructure database, it should also be possible to pass just the name of the datastore type to the instance call, such as "mysql" or "mongo". Maybe we could allow this in addition to the ID? I think this form should actually use the argument "type", and the id should then be passed as "type_id" instead. """ { "instance" : { "flavorRef" : "2", "name" : "as", "datastore": { "type" : "mysql", "version" : "94ed1f9f-6c1a-4d6e-87e9-04ecff37b64b" } "volume" : { "size" : "1" } } } """ 4. Additionally, in the current pull request to implement this it is possible to avoid passing a version, but only if no more than one version of the datastore_type exists in the database. I think instead the datastore_type row in the database should also have a "default_version_id" property, that an operator could update to the most recent version or whatever other criteria they wish to use, meaning the call could become this simple: """ { "instance" : { "flavorRef" : "2", "name" : "as", "datastore": { "type" : "mysql" } "volume" : { "size" : "1" } } } """ Thoughts? Thanks, Tim
_______________________________________________ OpenStack-dev mailing list OpenStack-dev@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev