From eb4bbf0f3e5bdf5259ea1674c2c84a9ce83ede69 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Tue, 8 Mar 2016 10:14:19 -0500 Subject: Use /healthz/ready when verifying api --- playbooks/common/openshift-master/scaleup.yml | 4 ++-- playbooks/common/openshift-node/config.yml | 4 ++-- roles/openshift_master/handlers/main.yml | 4 ++-- roles/openshift_master/tasks/main.yml | 4 ++-- roles/openshift_node/tasks/main.yml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/playbooks/common/openshift-master/scaleup.yml b/playbooks/common/openshift-master/scaleup.yml index 6f8151d30..ccb1d23f1 100644 --- a/playbooks/common/openshift-master/scaleup.yml +++ b/playbooks/common/openshift-master/scaleup.yml @@ -33,9 +33,9 @@ service: name={{ openshift.common.service_type }}-master-controllers state=restarted - name: verify api server command: > - curl -k --head --silent {{ openshift.master.api_url }} + curl -k --silent {{ openshift.master.api_url }}/healthz/ready register: api_available_output - until: api_available_output.stdout.find("200 OK") != -1 + until: api_available_output.stdout == 'ok' retries: 120 delay: 1 changed_when: false diff --git a/playbooks/common/openshift-node/config.yml b/playbooks/common/openshift-node/config.yml index 7edea9160..c62167bd3 100644 --- a/playbooks/common/openshift-node/config.yml +++ b/playbooks/common/openshift-node/config.yml @@ -258,9 +258,9 @@ # Using curl here since the uri module requires python-httplib2 and # wait_for port doesn't provide health information. command: > - curl -k --head --silent {{ openshift.master.api_url }} + curl -k --silent {{ openshift.master.api_url }}/healthz/ready register: api_available_output - until: api_available_output.stdout.find("200 OK") != -1 + until: api_available_output.stdout == 'ok' retries: 120 delay: 1 changed_when: false diff --git a/roles/openshift_master/handlers/main.yml b/roles/openshift_master/handlers/main.yml index 6b9992eea..4d1216aae 100644 --- a/roles/openshift_master/handlers/main.yml +++ b/roles/openshift_master/handlers/main.yml @@ -17,9 +17,9 @@ # Using curl here since the uri module requires python-httplib2 and # wait_for port doesn't provide health information. command: > - curl -k --head --silent {{ openshift.master.api_url }} + curl -k --silent {{ openshift.master.api_url }}/healthz/ready register: api_available_output - until: api_available_output.stdout.find("200 OK") != -1 + until: api_available_output.stdout == 'ok' retries: 120 delay: 1 changed_when: false diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 4f722679d..0e29e6854 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -277,9 +277,9 @@ # Using curl here since the uri module requires python-httplib2 and # wait_for port doesn't provide health information. command: > - curl -k --head --silent {{ openshift.master.api_url }} + curl -k --silent {{ openshift.master.api_url }}/healthz/ready register: api_available_output - until: api_available_output.stdout.find("200 OK") != -1 + until: api_available_output.stdout == 'ok' retries: 120 delay: 1 changed_when: false diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index b87c2aa21..b9887b68b 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -124,9 +124,9 @@ # Using curl here since the uri module requires python-httplib2 and # wait_for port doesn't provide health information. command: > - curl -k --head --silent {{ openshift_node_master_api_url }} + curl -k --silent {{ openshift_node_master_api_url }}/healthz/ready register: api_available_output - until: api_available_output.stdout.find("200 OK") != -1 + until: api_available_output.stdout == 'ok' retries: 120 delay: 1 changed_when: false -- cgit v1.2.3 From 74026a867051d6909db02bab4140d663b26b7968 Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Tue, 8 Mar 2016 10:52:55 -0500 Subject: reverting back to pre-pulling the master image --- roles/openshift_cli/tasks/main.yml | 5 +++++ roles/openshift_master/tasks/main.yml | 5 +++++ roles/openshift_node/tasks/main.yml | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml index e9d7f4afe..3b224416e 100644 --- a/roles/openshift_cli/tasks/main.yml +++ b/roles/openshift_cli/tasks/main.yml @@ -8,6 +8,11 @@ - name: Install clients action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-clients state=present" when: not openshift.common.is_containerized | bool + +- name: Pull CLI Image + command: > + docker pull {{ openshift.common.cli_image }}:{{ openshift_version }} + when: openshift.common.is_containerized | bool - name: Create /usr/local/bin/openshift cli wrapper template: diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 4f722679d..15b3c320c 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -92,6 +92,11 @@ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version }} state=present" when: not openshift.common.is_containerized | bool +- name: Pull master image + command: > + docker pull {{ openshift.master.master_image }}:{{ openshift_version }} + when: openshift.common.is_containerized | bool + - name: Install Master docker service file template: dest: "/etc/systemd/system/{{ openshift.common.service_type }}-master.service" diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index b87c2aa21..e250afe09 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -47,12 +47,12 @@ - name: Pull node image command: > - docker pull {{ openshift.node.node_image }} + docker pull {{ openshift.node.node_image }}:{{ openshift_version }} when: openshift.common.is_containerized | bool - name: Pull OpenVSwitch image command: > - docker pull {{ openshift.node.ovs_image }} + docker pull {{ openshift.node.ovs_image }}:{{ openshift_version }} when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool - name: Install Node docker service file -- cgit v1.2.3