diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-08-04 18:32:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-04 18:32:23 -0400 |
commit | 3db2bb10c0ad5e7ed702bfccdec03562533e8539 (patch) | |
tree | 27e9493d9e5ed24ec1847678b76e02e10d61ce77 /roles/openshift_node/tasks | |
parent | 145c90c9eb58ae9ce25e7795fcf403a2595d3580 (diff) | |
parent | 31e708a5d440a6ad13f81c4b94ad26e0b2d9587a (diff) | |
download | openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.gz openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.bz2 openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.tar.xz openshift-3db2bb10c0ad5e7ed702bfccdec03562533e8539.zip |
Merge pull request #4898 from giuseppe/cri-o
Merged by openshift-bot
Diffstat (limited to 'roles/openshift_node/tasks')
-rw-r--r-- | roles/openshift_node/tasks/main.yml | 13 | ||||
-rw-r--r-- | roles/openshift_node/tasks/openvswitch_system_container.yml | 13 |
2 files changed, 22 insertions, 4 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 87b1f6537..ca4fef360 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -2,9 +2,9 @@ # TODO: allow for overriding default ports where possible - fail: msg: "SELinux is disabled, This deployment type requires that SELinux is enabled." - when: > - (not ansible_selinux or ansible_selinux.status != 'enabled') and - deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise'] + when: + - (not ansible_selinux or ansible_selinux.status != 'enabled') and deployment_type in ['enterprise', 'online', 'atomic-enterprise', 'openshift-enterprise'] + - not openshift_docker_use_crio | default(false) # https://docs.openshift.com/container-platform/3.4/admin_guide/overcommit.html#disabling-swap-memory - name: Check for swap usage @@ -66,6 +66,13 @@ - openshift.common.use_openshift_sdn | default(true) | bool - not openshift.common.is_containerized | bool +- name: Restart cri-o + systemd: + name: cri-o + enabled: yes + state: restarted + when: openshift_docker_use_crio | default(false) + - name: Install conntrack-tools package package: name: "conntrack-tools" diff --git a/roles/openshift_node/tasks/openvswitch_system_container.yml b/roles/openshift_node/tasks/openvswitch_system_container.yml index 34c2334d8..dc1df9185 100644 --- a/roles/openshift_node/tasks/openvswitch_system_container.yml +++ b/roles/openshift_node/tasks/openvswitch_system_container.yml @@ -1,4 +1,15 @@ --- +- set_fact: + l_use_crio: "{{ openshift_docker_use_crio | default(false) }}" + +- set_fact: + l_service_name: "cri-o" + when: l_use_crio + +- set_fact: + l_service_name: "{{ openshift.docker.service_name }}" + when: not l_use_crio + - name: Pre-pull OpenVSwitch system container image command: > atomic pull --storage=ostree {{ 'docker:' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }} @@ -11,4 +22,4 @@ image: "{{ 'docker:' if openshift.common.system_images_registry == 'docker' else openshift.common.system_images_registry + '/' }}{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }}" state: latest values: - - "DOCKER_SERVICE={{ openshift.docker.service_name }}.service" + - "DOCKER_SERVICE={{ l_service_name }}" |