From d32ed35d13bbc4ab5f5e6a1a146e1bc8d111ac88 Mon Sep 17 00:00:00 2001
From: Sam Yaple <sam@yaple.net>
Date: Fri, 31 Jul 2015 21:50:43 +0000
Subject: [PATCH] Use sleep during database bootstrap

A small sleep is used to allow the database to initialize before
starting the databases on the other hosts.

Change-Id: I1ea9ee8be55f47ae917f9985431e1e919f64c101
Closes-Bug: #1479970
---
 ansible/roles/mariadb/tasks/bootstrap.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ansible/roles/mariadb/tasks/bootstrap.yml b/ansible/roles/mariadb/tasks/bootstrap.yml
index 8eea886d53..894ef19d2b 100644
--- a/ansible/roles/mariadb/tasks/bootstrap.yml
+++ b/ansible/roles/mariadb/tasks/bootstrap.yml
@@ -58,3 +58,8 @@
     container_volumes_from:
       - "mariadb_data"
   when: delegate_host == 'None' and inventory_hostname == groups['mariadb'][0]
+
+- name: Sleeping for 15 seconds while the cluster starts
+  command: sleep 15
+  changed_when: False
+  when: delegate_host == 'None' and inventory_hostname == groups['mariadb'][0]