Browse Source

Merge pull request #10641 from vrutkovs/crio-prepull

Start node image prepull after CRIO is restarted
OpenShift Merge Robot 6 years ago
parent
commit
006fb14e9a
2 changed files with 12 additions and 8 deletions
  1. 9 5
      roles/openshift_cli/tasks/main.yml
  2. 3 3
      roles/openshift_node/tasks/main.yml

+ 9 - 5
roles/openshift_cli/tasks/main.yml

@@ -6,11 +6,15 @@
   register: result
   until: result is succeeded
 
-- block:
-  - name: Pull CLI Image
-    docker_image:
-      name: "{{ openshift_cli_image }}"
-    when: not openshift_use_crio_only | bool
+- name: Check that CLI image is present
+  command: "{{ openshift_container_cli }} images -q {{ openshift_cli_image }}"
+  register: cli_image
+
+- name: Pre-pull cli image
+  command: "{{ openshift_container_cli }} pull {{ openshift_cli_image }}"
+  environment:
+    NO_PROXY: "{{ openshift.common.no_proxy | default('') }}"
+  when: cli_image.stdout_lines == []
 
 - name: Install bash completion for oc tools
   package:

+ 3 - 3
roles/openshift_node/tasks/main.yml

@@ -6,9 +6,6 @@
     - openshift_deployment_type == 'openshift-enterprise'
     - not openshift_use_crio | bool
 
-- name: Start node image prepull
-  import_tasks: prepull.yml
-
 - import_tasks: dnsmasq_install.yml
 - import_tasks: dnsmasq.yml
 
@@ -32,6 +29,9 @@
     enabled: yes
     state: restarted
 
+- name: Start node image prepull
+  import_tasks: prepull.yml
+
 - name: include node installer
   import_tasks: install.yml