[openstack-dev] [OSLO] DB Support

Davanum Srinivas davanum at gmail.com
Tue Apr 23 13:59:35 UTC 2013


Mark, Gary,

i took a stab at the first option
https://review.openstack.org/27345(switching from DEFAULT to
DATABASE).

-- dims

On Tue, Apr 23, 2013 at 8:43 AM, Mark McLoughlin <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
> 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/20130423/92548ebf/attachment.html>


More information about the OpenStack-dev mailing list