diff options
author | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2016-05-11 19:28:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-05-11 19:28:27 +0000 |
commit | 271dc336e71086af7f14a9585af71bb261557035 (patch) | |
tree | 79c71aa97976b450f24a2c7bdb78e879533724e7 /deploy | |
parent | a3d643bc61fb04b471d8a9a518092963ac072d9e (diff) | |
parent | da4623dd38ed8c44a2a21d330a95d40f675de3e8 (diff) |
Merge "deployment.py: stdout not consumed when deploying changes"
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/cloud/deployment.py | 12 |
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) |