Link: https://openstack.nimeyo.com/35311/?show=63539#c63539
From: dawn <[email protected]>

we know ceilometer use tooz to implement ha, so we can found the answer in tooz

  • First, tooz will parse the backendurl by netutils.urlsplit:
    > parsedurl = "">url)

  • Then, backend driver will be found by the url scheme, for example in my situation, memcached
    driver.DriverManager( namespace=TOOZ_BACKENDS_NAMESPACE, name=parsed_url.scheme, invoke_on_load=True, invoke_args=(member_id, parsed_url, options)).driver

  • Finally , the MemcachedDriver will be initialed as below
    def __init__(self, member_id, parsed_url, options): super(MemcachedDriver, self).__init__() options = utils.collapse(options) self._options = options self._member_id = member_id self._joined_groups = set() self._executor = utils.ProxyExecutor.build("Memcached", options) self.host = (parsed_url.hostname or "localhost", parsed_url.port or 11211) default_timeout = options.get('timeout', self.DEFAULT_TIMEOUT) self.timeout = int(default_timeout) self.membership_timeout = int(options.get( 'membership_timeout', default_timeout)) self.lock_timeout = int(options.get( 'lock_timeout', default_timeout)) self.leader_timeout = int(options.get( 'leader_timeout', default_timeout)) max_pool_size = options.get('max_pool_size', None) if max_pool_size is not None: self.max_pool_size = int(max_pool_size) else: self.max_pool_size = None self._acquired_locks = []

So, I set the backendurl as "memcached://127.0.0.1:11211"
You can find your answer here: tooz backend driver code

Hope this will help you!

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to