Пример #1
0
def crashDiag(node):

    util.output("[%s]" % node.name)

    if not execute.isdir(node, node.cwd()):
        util.output("No work dir found\n")
        return

    (rc, output) = execute.runHelper(node, "run-cmd",  [os.path.join(config.Config.scriptsdir, "crash-diag"), node.cwd()])
    if not rc:
        util.output("cannot run crash-diag for %s" % node.name)
        return

    for line in output:
        util.output(line)
Пример #2
0
def _breakLock():
    try:
        # Check whether lock is stale.
        pid = open(config.Config.lockfile, "r").readline().strip()
        (success, output) = execute.runHelper(config.Config.manager(), "check-pid", args=[pid])
        if success:
            # Process still exissts.
            return False

        # Break lock.
        warn("removing stale lock")
        os.unlink(config.Config.lockfile)
        return True

    except IOError:
        return False
Пример #3
0
def crashDiag(node):

    util.output("[%s]" % node.name)

    if not execute.isdir(node, node.cwd()):
        util.output("No work dir found\n")
        return

    (rc, output) = execute.runHelper(
        node, "run-cmd",
        [os.path.join(config.Config.scriptsdir, "crash-diag"),
         node.cwd()])
    if not rc:
        util.output("cannot run crash-diag for %s" % node.name)
        return

    for line in output:
        util.output(line)