From 58ca623f89b9367c65ff07e01648c649ab64a5f2 Mon Sep 17 00:00:00 2001 From: Yifei Xue Date: Sat, 16 Dec 2017 14:45:00 +0800 Subject: 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 --- deploy/adapters/ansible/roles/config-osa/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'deploy') 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 -- cgit 1.2.3-korg