Fix a couple of remaining issues.

This commit is contained in:
Stephen Provine 2016-12-16 13:55:12 -08:00
Родитель aff493dccc
Коммит fef62fb303
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -443,6 +443,8 @@ class DockerComposeParser(object):
# Calculate the new instances for each service
marathon_app = [app for app in marathon_json['apps'] \
if app['id'] == app_id][0]
if not app_id in target_service_instances:
target_service_instances[app_id] = 1
instance_count = math.ceil(
(target_service_instances[app_id] * self.minimum_health_capacity) / 100)
logging.info('Setting instances for app "%s" to %s',

Просмотреть файл

@ -229,7 +229,7 @@ class Marathon(object):
deployment_completed = False
timeout_exceeded = False
processor_catchup = False # Did we already give processor an extra second to finish up or not?
processor = DeploymentMonitor(self, app_ids, deployment_id)
processor = DeploymentMonitor(self, app_ids, deployment_id, log_failures)
processor.start()
while not deployment_completed:
@ -240,7 +240,7 @@ class Marathon(object):
a_deployment = [dep for dep in get_deployments_response if dep['id'] == deployment_id]
if len(a_deployment) == 0:
if not processor_catchup:
logging.info('Giving deployment monitor more time to catch-up on events')
logging.debug('Giving deployment monitor more time to catch-up on events')
for _ in range(0, 5):
if not processor.deployment_succeeded():
time.sleep(1)