Esempio n. 1
0
def cleanup(nodes, cleantmp=False):
    hadError = False
    util.output("cleaning up nodes ...")
    result = isRunning(nodes)
    running = [node for (node, on) in result if on]
    notrunning = [node for (node, on) in result if not on]

    results1 = execute.rmdirs([(n, n.cwd()) for n in notrunning])
    results2 = execute.mkdirs([(n, n.cwd()) for n in notrunning])
    if nodeFailed(results1) or nodeFailed(results2):
        hadError = True

    for node in notrunning:
        node.clearCrashed()

    for node in running:
        util.output("   %s is still running, not cleaning work directory" % node.name)

    if cleantmp:
        results3 = execute.rmdirs([(n, config.Config.tmpdir) for n in running + notrunning])
        results4 = execute.mkdirs([(n, config.Config.tmpdir) for n in running + notrunning])
        if nodeFailed(results3) or nodeFailed(results4):
            hadError = True

    return not hadError
Esempio n. 2
0
def cleanup(nodes, cleantmp=False):
    util.output("cleaning up nodes ...")
    result = isRunning(nodes)
    running =    [node for (node, on) in result if on]
    notrunning = [node for (node, on) in result if not on]

    execute.rmdirs([(n, n.cwd()) for n in notrunning])
    execute.mkdirs([(n, n.cwd()) for n in notrunning])

    for node in notrunning:
        node.clearCrashed();

    for node in running:
        util.output("   %s is still running, not cleaning work directory" % node.name)

    if cleantmp:
        execute.rmdirs([(n, config.Config.tmpdir) for n in running + notrunning])
        execute.mkdirs([(n, config.Config.tmpdir) for n in running + notrunning])
Esempio n. 3
0
def cleanup(nodes, cleantmp=False):
    util.output("cleaning up nodes ...")
    result = isRunning(nodes)
    running = [node for (node, on) in result if on]
    notrunning = [node for (node, on) in result if not on]

    execute.rmdirs([(n, n.cwd()) for n in notrunning])
    execute.mkdirs([(n, n.cwd()) for n in notrunning])

    for node in notrunning:
        node.clearCrashed()

    for node in running:
        util.output("   %s is still running, not cleaning work directory" %
                    node.name)

    if cleantmp:
        execute.rmdirs([(n, config.Config.tmpdir)
                        for n in running + notrunning])
        execute.mkdirs([(n, config.Config.tmpdir)
                        for n in running + notrunning])