summaryrefslogtreecommitdiffstats
path: root/deploy/adapters
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-12-16 14:45:00 +0800
committerYifei Xue <xueyifei@huawei.com>2017-12-16 14:45:00 +0800
commit58ca623f89b9367c65ff07e01648c649ab64a5f2 (patch)
tree773a16070d1dcc52a0cd34eaf8bad9f6e1f7a9a5 /deploy/adapters
parent0432c91cb2c2e11576a63ec93f596c4fb5c9286b (diff)
Bug fix for the random failure of pip_install
JIAR: - For centos deployment, it sometimes fails when run the role: pip_install due to the network is not so stable. So we add some retyies here to avoid the failure. Change-Id: I9774e5be4d42a66f8cf377ec83161b200266d3d0 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters')
-rwxr-xr-xdeploy/adapters/ansible/roles/config-osa/tasks/main.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
index 046b25e5..ac4ce418 100755
--- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml
@@ -63,6 +63,18 @@
/etc/yum.repos.d/CentOS-Base.repo.bak;
when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS'
+- name: fix the problem in pip_install
+ blockinfile:
+ dest: /etc/ansible/roles/pip_install/tasks/pre_install_yum.yml
+ insertafter: 'pip_install_package_state'
+ block: |
+ # add retry
+ register: repo_result
+ until: repo_result | success
+ retries: 5
+ delay: 10
+ when: hostvars[hostvars[inventory_hostname]['groups']['controller'][0]]['local_mirror'] == 'CentOS'
+
- name: add mariadb local repository
blockinfile:
dest: /etc/openstack_deploy/user_variables.yml