in src/slurm_plugin/clustermgtd.py [0:0]
def _get_inactive_instances_and_nodes(partitions):
inactive_instance_ids = set()
inactive_nodes = set()
try:
for partition in partitions:
if partition.is_inactive():
inactive_nodes |= set(partition.slurm_nodes)
inactive_instance_ids |= {node.instance.id for node in partition.slurm_nodes if node.instance}
except Exception as e:
log.error("Unable to get inactive instances and nodes. Exception: %s", e)
return inactive_instance_ids, inactive_nodes