summaryrefslogtreecommitdiffstats
path: root/fuel/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'fuel/deploy')
-rw-r--r--fuel/deploy/cloud/deployment.py4
-rw-r--r--fuel/deploy/common.py7
-rw-r--r--fuel/deploy/install_fuel_master.py1
3 files changed, 7 insertions, 5 deletions
diff --git a/fuel/deploy/cloud/deployment.py b/fuel/deploy/cloud/deployment.py
index defe5eb64..a294be545 100644
--- a/fuel/deploy/cloud/deployment.py
+++ b/fuel/deploy/cloud/deployment.py
@@ -47,7 +47,7 @@ class Deployment(object):
results, _ = exec_cmd(cmd, False)
for result in results.splitlines():
log_msg = ''
- cmd = ('ssh -q node-%s grep -B%s \'"%s"\' %s'
+ cmd = ('ssh -q node-%s "grep -B%s \\"%s\\" %s"'
% (node_id, GREP_LINES_OF_LEADING_CONTEXT, result,
LOG_FILE))
details, _ = exec_cmd(cmd, False)
@@ -61,7 +61,7 @@ class Deployment(object):
if found_prev_log:
log_msg += '\n'.join(details_list[i:-1]) + '\n'
- cmd = ('ssh -q node-%s grep -A%s \'"%s"\' %s'
+ cmd = ('ssh -q node-%s "grep -A%s \\"%s\\" %s"'
% (node_id, GREP_LINES_OF_TRAILING_CONTEXT, result,
LOG_FILE))
details, _ = exec_cmd(cmd, False)
diff --git a/fuel/deploy/common.py b/fuel/deploy/common.py
index cdc54b43a..17fd2174a 100644
--- a/fuel/deploy/common.py
+++ b/fuel/deploy/common.py
@@ -30,10 +30,13 @@ formatter = logging.Formatter('%(message)s')
out_handler = logging.StreamHandler(sys.stdout)
out_handler.setFormatter(formatter)
LOG.addHandler(out_handler)
-out_handler = logging.FileHandler('autodeploy.log', mode='w')
+LOGFILE = 'autodeploy.log'
+if os.path.isfile(LOGFILE):
+ os.remove(LOGFILE)
+out_handler = logging.FileHandler(LOGFILE, mode='w')
out_handler.setFormatter(formatter)
LOG.addHandler(out_handler)
-os.chmod('autodeploy.log', stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
+os.chmod(LOGFILE, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
def exec_cmd(cmd, check=True):
process = subprocess.Popen(cmd,
diff --git a/fuel/deploy/install_fuel_master.py b/fuel/deploy/install_fuel_master.py
index 1b82483eb..e3a7327c0 100644
--- a/fuel/deploy/install_fuel_master.py
+++ b/fuel/deploy/install_fuel_master.py
@@ -211,7 +211,6 @@ class InstallFuelMaster(object):
def post_install_cleanup(self):
log('Eject ISO file %s' % self.iso_file)
self.dha.node_eject_iso(self.fuel_node_id)
- log('Remove ISO directory %s' % self.iso_dir)
delete(self.iso_dir)
def delete_deprecated_fuel_client_config(self):