diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-01-19 14:46:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-01-19 14:46:56 +0000 |
commit | fb61ae7e540167ac41674de21442cc20de356337 (patch) | |
tree | acf650c4a416fd844de60d04344e7212a0e1f54b /ironic/conductor/base_manager.py | |
parent | 5ef20fe6c37b54f6b489259bcd2ce2dae80d9e22 (diff) | |
parent | b08e536831f3aa745c01480110b00dd859f6968e (diff) | |
download | ironic-fb61ae7e540167ac41674de21442cc20de356337.tar.gz |
Merge "Move to tooz hash ring implementation"
Diffstat (limited to 'ironic/conductor/base_manager.py')
-rw-r--r-- | ironic/conductor/base_manager.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ironic/conductor/base_manager.py b/ironic/conductor/base_manager.py index e3a2edc21..6c88708ba 100644 --- a/ironic/conductor/base_manager.py +++ b/ironic/conductor/base_manager.py @@ -26,7 +26,7 @@ from oslo_utils import excutils from ironic.common import context as ironic_context from ironic.common import driver_factory from ironic.common import exception -from ironic.common import hash_ring as hash +from ironic.common import hash_ring from ironic.common.i18n import _, _LC, _LE, _LI, _LW from ironic.common import rpc from ironic.common import states @@ -78,7 +78,7 @@ class BaseConductorManager(object): check_and_reject=rejection_func) """Executor for performing tasks async.""" - self.ring_manager = hash.HashRingManager() + self.ring_manager = hash_ring.HashRingManager() """Consistent hash ring which maps drivers to conductors.""" # NOTE(deva): these calls may raise DriverLoadError or DriverNotFound @@ -302,7 +302,9 @@ class BaseConductorManager(object): except exception.DriverNotFound: return False - return self.host in ring.get_hosts(node_uuid) + return self.host in ring.get_nodes( + node_uuid.encode('utf-8'), + replicas=CONF.hash_distribution_replicas) def _fail_if_in_state(self, context, filters, provision_state, sort_key, callback_method=None, |