def gather_sosreport_data(output_dir: str):
    sosreport_output = os.path.join(output_dir, "sosreport")
    recreate_folder(sosreport_output)

    controller = LibvirtController(config=TerraformConfig(),
                                   entity_config=ClusterConfig())
    run_concurrently(
        jobs=[(gather_sosreport_from_node, node, sosreport_output)
              for node in controller.list_nodes()],
        timeout=60 * 20,
    )
def gather_sosreport_data(output_dir: str,
                          private_ssh_key_path: str=private_ssh_key_path_default):
    sosreport_output = os.path.join(output_dir, "sosreport")
    recreate_folder(sosreport_output)

    controller = LibvirtController(private_ssh_key_path=private_ssh_key_path)
    run_concurrently(
        jobs=[(gather_sosreport_from_node, node, sosreport_output)
              for node in controller.list_nodes()],
        timeout=60 * 20,
    )
示例#3
0
 def run_ssh_command_on_given_nodes(nodes, command) -> Dict:
     return run_concurrently(
         {node.name: (node.run_command, command)
          for node in nodes})
示例#4
0
 def run_for_given_nodes(nodes, func_name, *args):
     logging.info("Running %s on nodes : %s", func_name, nodes)
     return run_concurrently([(getattr(node, func_name), *args)
                              for node in nodes])