diff options
author | Matt Woodson <mwoodson@gmail.com> | 2016-01-18 15:08:03 -0500 |
---|---|---|
committer | Matt Woodson <mwoodson@gmail.com> | 2016-01-18 15:08:03 -0500 |
commit | 3bed4d0c4bda1b6332ec547502663d09e98b89d1 (patch) | |
tree | f64e0d0c7e9bc06a76d727050047053cf1a30a6a /roles/openshift_node | |
parent | 0bbfef4e1951db1f19135e532f78fe12cab6d4fc (diff) | |
parent | ee3aec770b6b1a2b0212b432a920e3d846e56044 (diff) | |
download | openshift-3bed4d0c4bda1b6332ec547502663d09e98b89d1.tar.gz openshift-3bed4d0c4bda1b6332ec547502663d09e98b89d1.tar.bz2 openshift-3bed4d0c4bda1b6332ec547502663d09e98b89d1.tar.xz openshift-3bed4d0c4bda1b6332ec547502663d09e98b89d1.zip |
Merge pull request #1214 from openshift/master
Merge master into prod
Diffstat (limited to 'roles/openshift_node')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 44 | ||||
-rw-r--r-- | roles/openshift_node/tasks/storage_plugins/nfs.yml | 4 | ||||
-rw-r--r-- | roles/openshift_node/templates/node.yaml.v1.j2 | 4 |
3 files changed, 21 insertions, 31 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 33852d7f8..9035248f9 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -44,41 +44,14 @@ action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-sdn-ovs{{ openshift_version }} state=present" when: openshift.common.use_openshift_sdn and not openshift.common.is_containerized | bool -- name: Get docker images - command: docker images - changed_when: false - when: openshift.common.is_containerized | bool - register: docker_images - - name: Pull node image command: > docker pull {{ openshift.node.node_image }} - when: openshift.common.is_containerized | bool and openshift.node.node_image not in docker_images.stdout - -- name: Wait for node image - command: > - docker images - register: docker_images - until: openshift.node.node_image in docker_images.stdout - retries: 30 - delay: 10 - changed_when: false when: openshift.common.is_containerized | bool - + - name: Pull OpenVSwitch image command: > docker pull {{ openshift.node.ovs_image }} - when: openshift.common.is_containerized | bool and openshift.node.ovs_image not in docker_images.stdout - and openshift.common.use_openshift_sdn | bool - -- name: Wait for OpenVSwitch image - command: > - docker images - register: docker_images - until: openshift.node.ovs_image in docker_images.stdout - retries: 30 - delay: 10 - changed_when: false when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool - name: Install Node docker service file @@ -130,6 +103,21 @@ - name: Additional storage plugin configuration include: storage_plugins/main.yml +# Necessary because when you're on a node that's also a master the master will be +# restarted after the node restarts docker and it will take up to 60 seconds for +# systemd to start the master again +- name: Wait for master API to become available before proceeding + # 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 }} + register: api_available_output + until: api_available_output.stdout.find("200 OK") != -1 + retries: 120 + delay: 1 + changed_when: false + when: openshift.common.is_containerized | bool + - name: Start and enable node service: name={{ openshift.common.service_type }}-node enabled=yes state=started register: start_result diff --git a/roles/openshift_node/tasks/storage_plugins/nfs.yml b/roles/openshift_node/tasks/storage_plugins/nfs.yml index 1edf21d9b..14a613786 100644 --- a/roles/openshift_node/tasks/storage_plugins/nfs.yml +++ b/roles/openshift_node/tasks/storage_plugins/nfs.yml @@ -1,4 +1,8 @@ --- +- name: Install NFS storage plugin dependencies + action: "{{ ansible_pkg_mgr }} name=nfs-utils state=present" + when: not openshift.common.is_atomic | bool + - name: Set seboolean to allow nfs storage plugin access from containers seboolean: name: virt_use_nfs diff --git a/roles/openshift_node/templates/node.yaml.v1.j2 b/roles/openshift_node/templates/node.yaml.v1.j2 index 23bd81f91..cbe811f83 100644 --- a/roles/openshift_node/templates/node.yaml.v1.j2 +++ b/roles/openshift_node/templates/node.yaml.v1.j2 @@ -11,9 +11,7 @@ imageConfig: format: {{ openshift.node.registry_url }} latest: false kind: NodeConfig -{% if openshift.node.kubelet_args is defined and openshift.node.kubelet_args %} -kubeletArguments: {{ openshift.node.kubelet_args | to_json }} -{% endif %} +kubeletArguments: {{ openshift.node.kubelet_args | default(None) | to_padded_yaml(level=1) }} masterKubeConfig: system:node:{{ openshift.common.hostname }}.kubeconfig {% if openshift.common.use_openshift_sdn %} networkPluginName: {{ openshift.common.sdn_network_plugin_name }} |