From fe9092bab7ecfc58aa10ba4165c9bf21a99170e2 Mon Sep 17 00:00:00 2001 From: Vladislav Belogrudov Date: Mon, 10 Aug 2015 15:02:08 +0300 Subject: [PATCH] Ansible should wait bootstrap container on first host Bootstrapping of Keystone/Glance happens on first host via 'run_once'. After running bootstrap containers we should wait for them also on the same host. Currently waiting is done on all hosts what gives task error on other hosts. Change-Id: I6eac928d405ea819982118d9b567988074be4ed2 Closes-Bug: #1483224 --- ansible/roles/glance/tasks/bootstrap.yml | 1 + ansible/roles/keystone/tasks/bootstrap.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/ansible/roles/glance/tasks/bootstrap.yml b/ansible/roles/glance/tasks/bootstrap.yml index 3ccaacb03d..374e3c7f15 100644 --- a/ansible/roles/glance/tasks/bootstrap.yml +++ b/ansible/roles/glance/tasks/bootstrap.yml @@ -69,6 +69,7 @@ # https://github.com/ansible/ansible-modules-core/pull/1031 - name: Waiting for bootstrap container to exit command: docker wait bootstrap_glance + run_once: True when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed - name: Cleaning up Glance boostrap container diff --git a/ansible/roles/keystone/tasks/bootstrap.yml b/ansible/roles/keystone/tasks/bootstrap.yml index e6b179f48c..91485a3cc0 100644 --- a/ansible/roles/keystone/tasks/bootstrap.yml +++ b/ansible/roles/keystone/tasks/bootstrap.yml @@ -58,6 +58,7 @@ # https://github.com/ansible/ansible-modules-core/pull/1031 - name: Waiting for Keystone bootstrap container to exit command: docker wait bootstrap_keystone + run_once: True when: database.stdout.find('localhost | SUCCESS => ') != -1 and (database.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed - name: Cleaning up Keystone boostrap container