in src/slurm_plugin/clustermgtd.py [0:0]
def _update_static_nodes_in_replacement(self, slurm_nodes: List[SlurmNode]):
"""Remove from self.static_nodes_in_replacement nodes that are up or that are in maintenance."""
nodename_to_slurm_nodes_map = {node.name: node for node in slurm_nodes}
nodes_still_in_replacement = set()
for nodename in self._static_nodes_in_replacement:
node = nodename_to_slurm_nodes_map.get(nodename)
# Consider nodename still in replacement if node is not up and not in maintenance
if node and not node.is_up() and not node.is_in_maintenance():
nodes_still_in_replacement.add(nodename)
# override self._static_nodes_in_replacement with updated list
self._static_nodes_in_replacement = nodes_still_in_replacement
# update node attributes
for node in slurm_nodes:
node.is_static_nodes_in_replacement = node.name in self._static_nodes_in_replacement
node.is_being_replaced = self._is_node_being_replaced(node)
node._is_replacement_timeout = self._is_node_replacement_timeout(node)