Merge "Fix update nodes in fencers"
This commit is contained in:
commit
4962bae5a7
|
@ -64,8 +64,7 @@ class StandardEvacuator(EvacuatorBaseDriver):
|
|||
|
||||
nodes = succeeded_nodes
|
||||
if enable_fencing:
|
||||
self.fencer.update_nodes(nodes)
|
||||
nodes = self.fencer.fence()
|
||||
nodes = self.fencer.fence(nodes=nodes)
|
||||
"""
|
||||
@todo this code needs to be commented for the time being till we fix
|
||||
nova bug found in state, which always go up afer enable or disable. We
|
||||
|
|
|
@ -41,10 +41,6 @@ class FencerBaseDriver(object):
|
|||
self.nodes = nodes
|
||||
self.fencer_conf = fencer_conf
|
||||
|
||||
def update_nodes(self, nodes):
|
||||
"""Allows changing the nodes during the evacuation..."""
|
||||
self.nodes = nodes
|
||||
|
||||
@abc.abstractmethod
|
||||
def fence(self):
|
||||
"""This function to be implemented by each driver. Each driver will
|
||||
|
|
|
@ -26,14 +26,18 @@ class FencerManager(object):
|
|||
self.fencer_conf = CONF.get('fencer')
|
||||
self.nodes = nodes
|
||||
|
||||
def fence(self):
|
||||
def fence(self, nodes=None):
|
||||
"""
|
||||
Try to shutdown nodes and wait for configurable amount of times
|
||||
:return: list of nodes and either they are shutdown or failed
|
||||
"""
|
||||
# update the list of nodes if required!
|
||||
if nodes:
|
||||
self.nodes = nodes
|
||||
driver_name = self.fencer_conf['driver']
|
||||
driver = importutils.import_object(
|
||||
driver_name,
|
||||
self.nodes,
|
||||
self.fencer_conf
|
||||
)
|
||||
LOG.debug('Loaded fencing driver {0} with config: '
|
||||
|
|
Loading…
Reference in New Issue