[openstack-dev] [OSLO] DB Support

Gary Kotton gkotton at redhat.com
Wed Apr 24 08:59:15 UTC 2013


On 04/23/2013 04:59 PM, Davanum Srinivas wrote:
> Mark, Gary,
>
> i took a stab at the first option https://review.openstack.org/27345 
> (switching from DEFAULT to DATABASE).

Thanks for the patch. Do we need to defer the common DB integration into 
Quantum until the BP for the case sensitive section is implemented (not 
sure how long this will take)?

>
> -- dims
>
> On Tue, Apr 23, 2013 at 8:43 AM, Mark McLoughlin <markmc at redhat.com 
> <mailto:markmc at redhat.com>> wrote:
>
>     On Tue, 2013-04-23 at 10:54 +0300, Gary Kotton wrote:
>
>     > 3. In the current Quantum versions all of the database configuration
>     > information is under a section [DATABASE]. The common code moves
>     this to
>     > [DEFAULT]. If possible it would be great if we could preserve the
>     > current configuration file settings. This will enable us to have
>     > smoother version upgrades. If this is not possible then we will
>     need a
>     > migration script to update configuration files. Does anyone have
>     > thoughts on this? I would like to make changes to the common code to
>     > ensure that we can use the DATABASE section.
>
>     Ok, the bug outlines one option:
>
>     https://bugs.launchpad.net/oslo/+bug/1171837
>
>     we move the db options to the 'database' group and make the group
>     names
>     case insensitive as per:
>
>     https://blueprints.launchpad.net/oslo/+spec/cfg-lowercase-groups
>
>     Another option is to have get_session() in oslo take an sql_connection
>     parameter which would override CONF.sql_connection. Quantum would have
>     something like this:
>
>       sql_opts = [
>           cfg.StrOpt('sql_connection', default=None),
>       ]
>
>       CONF.register_opts(sql_opts, group='DEFAULT')
>
>       def get_session():
>           if CONF.sql_connection:
>               log.warn("deprecated!")
>           return db_session.get_session(CONF.sql_connection)
>
>     If the sets DATABASE.sql_connection they get a deprecation warning but
>     it still works. If they don't set DATABASE.sql_connection, the
>     common DB
>     code just falls back to DEFAULT.sql_connection.
>
>     Cheers,
>     Mark.
>
>
>     _______________________________________________
>     OpenStack-dev mailing list
>     OpenStack-dev at lists.openstack.org
>     <mailto:OpenStack-dev at lists.openstack.org>
>     http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
> -- 
> Davanum Srinivas :: http://davanum.wordpress.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130424/a0162756/attachment.html>


More information about the OpenStack-dev mailing list