aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/cloud
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/cloud')
-rw-r--r--deploy/cloud/deployment.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/deploy/cloud/deployment.py b/deploy/cloud/deployment.py
index 306abf006..0127d2a52 100644
--- a/deploy/cloud/deployment.py
+++ b/deploy/cloud/deployment.py
@@ -101,8 +101,8 @@ class Deployment(object):
LOG_FILE = 'cloud.log'
log('Starting deployment of environment %s' % self.env_id)
- run_proc('fuel --env %s deploy-changes | strings | tee %s'
- % (self.env_id, LOG_FILE))
+ p = run_proc('fuel --env %s deploy-changes | strings > %s'
+ % (self.env_id, LOG_FILE))
ready = False
for i in range(int(self.deploy_timeout)):
@@ -119,7 +119,13 @@ class Deployment(object):
break
else:
time.sleep(SLEEP_TIME)
- delete(LOG_FILE)
+
+ p.poll()
+ if p.returncode == None:
+ log('The process deploying the changes has not yet finished.')
+ log('''The file %s won't be deleted''' % LOG_FILE)
+ else:
+ delete(LOG_FILE)
if ready:
log('Environment %s successfully deployed' % self.env_id)