fix: ssh parameters and import subprocess
This commit is contained in:
parent
7b34445397
commit
fd11d84149
6
conf.py
6
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'
|
||||
|
3
nodes.py
3
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,
|
||||
|
2
timmy.py
2
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:
|
||||
|
Loading…
Reference in New Issue
Block a user