Merge "Move hash ring initialization to init_host() for ironic" into stable/pike
This commit is contained in:
commit
27727e3419
|
@ -2659,7 +2659,9 @@ class HashRingTestCase(test.NoDBTestCase):
|
|||
|
||||
@mock.patch.object(ironic_driver.IronicDriver, '_refresh_hash_ring')
|
||||
def test_hash_ring_refreshed_on_init(self, mock_hr):
|
||||
ironic_driver.IronicDriver(None)
|
||||
d = ironic_driver.IronicDriver(None)
|
||||
self.assertFalse(mock_hr.called)
|
||||
d.init_host('foo')
|
||||
mock_hr.assert_called_once_with(mock.ANY)
|
||||
|
||||
@mock.patch.object(hash_ring, 'HashRing')
|
||||
|
@ -2718,6 +2720,7 @@ class NodeCacheTestCase(test.NoDBTestCase):
|
|||
super(NodeCacheTestCase, self).setUp()
|
||||
|
||||
self.driver = ironic_driver.IronicDriver(None)
|
||||
self.driver.init_host('foo')
|
||||
self.driver.virtapi = fake.FakeVirtAPI()
|
||||
self.ctx = nova_context.get_admin_context()
|
||||
|
||||
|
|
|
@ -152,7 +152,6 @@ class IronicDriver(virt_driver.ComputeDriver):
|
|||
self.node_cache = {}
|
||||
self.node_cache_time = 0
|
||||
self.servicegroup_api = servicegroup.API()
|
||||
self._refresh_hash_ring(nova_context.get_admin_context())
|
||||
|
||||
self.ironicclient = client_wrapper.IronicClientWrapper()
|
||||
|
||||
|
@ -508,7 +507,7 @@ class IronicDriver(virt_driver.ComputeDriver):
|
|||
:param host: the hostname of the compute host.
|
||||
|
||||
"""
|
||||
return
|
||||
self._refresh_hash_ring(nova_context.get_admin_context())
|
||||
|
||||
def _pike_flavor_migration(self, node_uuids):
|
||||
"""This code is needed in Pike to prevent problems where an operator
|
||||
|
|
Loading…
Reference in New Issue