[openstack-dev] [Neutron] [Dragonflow] Support configuration of DB clusters

Li Ma skywalker.nick at gmail.com
Mon Dec 28 07:48:35 UTC 2015


My intention is to pass db-host-list (maybe it is defined in the conf
file) to db backend drivers. I find that there's '**args' available
[1], but it seems not working due to [2].

I suggest to use a simpler method to allow user-defined configuration that is
removing db_ip and db_port parameters and directly passing cfg.CONF
object to db backend driver.

In db_api.py, it should be:
def initialize(self, config):
    self.config = config

In api_nb.py, it should be:
def initialize(self):
        self.driver.initialize(cfg.CONF) <-- from oslo_config

As a result, let db backend developers choose which parameter to use.

[1] https://github.com/openstack/dragonflow/blob/master/dragonflow/db/db_api.py#L21
[2] https://github.com/openstack/dragonflow/blob/master/dragonflow/db/api_nb.py#L74-L75

On Mon, Dec 28, 2015 at 9:12 AM, shihanzhang <ayshihanzhang at 126.com> wrote:
>
> good suggestion!
>
>
> At 2015-12-25 19:07:10, "Li Ma" <skywalker.nick at gmail.com> wrote:
>>Hi all, currently, we only support db_ip and db_port in the
>>configuration file. Some DB SDK supports clustering, like Zookeeper.
>>You can specify a list of nodes when client application starts to
>>connect to servers.
>>
>>I'd like to implement this feature, specifying ['ip1:port',
>>'ip2:port', 'ip3:port'] list in the configuration file. If only one
>>server exists, just set it to ['ip1:port'].
>>
>>Any suggestions?
>>
>>--
>>
>>Li Ma (Nick)
>>Email: skywalker.nick at gmail.com
>>
>>__________________________________________________________________________
>>OpenStack Development Mailing List (not for usage questions)
>>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
>
>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 

Li Ma (Nick)
Email: skywalker.nick at gmail.com



More information about the OpenStack-dev mailing list