diff --git a/conf.py b/conf.py index 35dda32..e936e7f 100644 --- a/conf.py +++ b/conf.py @@ -8,9 +8,9 @@ class Conf(object): """Configuration parameters""" hard_filter = None soft_filter = NodeFilter() - ssh = {'opts': '''-oConnectTimeout=2 -oStrictHostKeyChecking=no - -oUserKnownHostsFile=/dev/null -oLogLevel=error - -lroot -oBatchMode=yes''', + ssh = {'opts': ('-oConnectTimeout=2 -oStrictHostKeyChecking=no ' + '-oUserKnownHostsFile=/dev/null -oLogLevel=error ' + '-lroot -oBatchMode=yes'), 'vars': 'OPENRC=/root/openrc IPTABLES_STR="iptables -nvL"'} cluster = None fuelip = 'localhost' diff --git a/nodes.py b/nodes.py index 718c151..d537835 100644 --- a/nodes.py +++ b/nodes.py @@ -28,7 +28,6 @@ import threading import re from tools import * - ckey = 'cmds' fkey = 'files' lkey = 'logs' @@ -263,6 +262,7 @@ class Nodes(object): """Class nodes """ def __init__(self, cluster, extended, conf, destdir, filename=None): + import_subprocess() self.dirname = conf.rqdir.rstrip('/') if (not os.path.exists(self.dirname)): logging.error("directory %s doesn't exist" % (self.dirname)) @@ -515,6 +515,7 @@ class Nodes(object): llf.write(line+"\0") except: logging.error("create_archive_logs: Can't write to file %s" % logslistfile) + continue cmd = "tar --bzip2 --create --file - --null --files-from -" t = threading.Thread(target=node.exec_simple_cmd, args=(cmd, diff --git a/timmy.py b/timmy.py index 0b4d3ba..169ba49 100755 --- a/timmy.py +++ b/timmy.py @@ -22,7 +22,6 @@ import sys import os from conf import Conf import flock -from tools import import_subprocess def main(argv=None): @@ -60,7 +59,6 @@ def main(argv=None): loglevel = logging.INFO logging.basicConfig(level=loglevel, format='%(asctime)s %(levelname)s %(message)s') - import_subprocess() config = Conf.load_conf(args.config) main_arc = os.path.join(config.archives, 'general.tar.bz2') if args.dest_file: