Browse Source

Add retries to package command

The package command could fail due to intermittent network issues. The
command will be retried 3 times (Ansible default) and will fail if there
is a package or repo issue.

Package failures (flakes) have been observed in CI testing.
Russell Teague 5 years ago
parent
commit
2552ec15d7
2 changed files with 6 additions and 0 deletions
  1. 4 0
      roles/openshift_node/tasks/install.yml
  2. 2 0
      test/aws/scaleup.yml

+ 4 - 0
roles/openshift_node/tasks/install.yml

@@ -5,6 +5,8 @@
     update_cache: true
   async: 3600
   poll: 30
+  register: result
+  until: result is succeeded
 
 # FIXME: Creation of these directories should not be required for crio 1.14.5
 - name: Create CNI dirs for crio
@@ -48,6 +50,8 @@
       state: present
     async: 3600
     poll: 30
+    register: result
+    until: result is succeeded
 
   rescue:
   - name: Package install failure message

+ 2 - 0
test/aws/scaleup.yml

@@ -55,6 +55,8 @@
     package:
       name: nfs-utils
       state: present
+    register: result
+    until: result is succeeded
   - name: Wait for new nodes to be ready
     k8s_facts:
       kubeconfig: "{{ kubeconfig_path }}"