bugfix: Unable to locate package python-minimal 03/54103/7
authorzhihui wu <wu.zhihui1@zte.com.cn>
Mon, 19 Mar 2018 11:32:51 +0000 (19:32 +0800)
committerzhihui wu <wu.zhihui1@zte.com.cn>
Thu, 22 Mar 2018 01:05:52 +0000 (09:05 +0800)
This log shows python-minimal can't be located.
https://build.opnfv.org/ci/view/qtip/job/qtip-compute-fuel-zte-virtual6-master/21/console

Change-Id: Idbdd47bae68ac5998c75f33ab8dd2851238d8484
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
resources/ansible_roles/qtip-generator/files/compute/run.yml

index 59f84c3..c166e48 100644 (file)
 {% if sut == 'vnf' %}
   gather_facts: no
   pre_tasks:
-    - name: check whether install python 2 in target
+
+    - name: check whether install python 2.x in remote target
       become: yes
       raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal)
+      register: rs
+      # Sometimes vm's network is not ready, have to give some attempts to install packages
+      until: rs.stdout.find("Setting up python-minimal") != -1
+      retries: 10
+      delay: 10
     - name: gather facts
       setup:
 {% endif %}