summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2018-11-05 20:08:43 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2018-11-05 20:09:12 +0800
commit43aad4c8b7f25976001067130b55486ad5ba98b4 (patch)
treedda016a8cb93ad5bfa7e691f21a75d63509e1e7d /deploy/adapters/ansible
parent2a079467460c3d12672232607ded589280396c50 (diff)
Add delay in nova when spinning VM
JIRA: - Change-Id: I3c2e291fe41135b3653a78473e8851703184847f Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml1
-rw-r--r--deploy/adapters/ansible/roles/post-openstack/tasks/main.yml9
2 files changed, 10 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index 874fcfb5..152a7dc0 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -107,6 +107,7 @@
- utility_all[0]
- network_hosts[0]
- horizon
+ - compute
remote_user: root
roles:
- post-openstack
diff --git a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
index 0bd9aeff..0efa1cdf 100644
--- a/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/post-openstack/tasks/main.yml
@@ -86,3 +86,12 @@
state: restarted
when:
- inventory_hostname in groups['horizon']
+
+- name: add sleep in nova
+ shell:
+ sed -i '/return self.driver.host_power_action/i\ time.sleep(2)' manager.py
+ args:
+ chdir: /openstack/venvs/nova-{{ openstack_release }}/lib/python2.7/site-packages/nova/compute
+ ignore_errors: true
+ when:
+ - inventory_hostname in groups['compute']