--- # input variables: # - l_docker_upgrade # - openshift.common.is_atomic # - node_config_hook # - openshift_pkg_version # - openshift.common.is_containerized # - deployment_type # - openshift_release # tasks file for openshift_node_upgrade - name: Stop node and openvswitch services service: name: "{{ item }}" state: stopped with_items: - "{{ openshift_service_type }}-node" - openvswitch failed_when: false - name: Ensure containerized services stopped before Docker restart service: name: "{{ item }}" state: stopped with_items: - etcd_container - openvswitch - "{{ openshift_service_type }}-master-api" - "{{ openshift_service_type }}-master-controllers" - "{{ openshift_service_type }}-node" failed_when: false when: openshift.common.is_containerized | bool - service: name: docker state: stopped register: l_openshift_node_upgrade_docker_stop_result until: not l_openshift_node_upgrade_docker_stop_result | failed retries: 3 delay: 30 when: - l_docker_upgrade is defined - l_docker_upgrade | bool - name: Stop rpm based services service: name: "{{ item }}" state: stopped with_items: - "{{ openshift_service_type }}-node" - openvswitch failed_when: false when: not openshift.common.is_containerized | bool - include_tasks: "{{ node_config_hook }}" when: node_config_hook is defined # https://bugzilla.redhat.com/show_bug.cgi?id=1513054 - name: Clean up dockershim data file: path: "/var/lib/dockershim/sandbox/" state: absent - name: Disable swap command: swapoff --all when: - openshift_node_upgrade_swap_result | default(False) | bool - openshift_disable_swap | default(true) | bool # End Disable Swap Block - name: Reset selinux context command: restorecon -RF {{ openshift_node_data_dir }}/openshift.local.volumes when: - ansible_selinux is defined - ansible_selinux.status == 'enabled' # Restart all services - include_tasks: upgrade/restart.yml - name: Wait for node to be ready oc_obj: state: list kind: node name: "{{ openshift.common.hostname | lower }}" register: node_output delegate_to: "{{ groups.oo_first_master.0 }}" until: node_output.results.returncode == 0 and node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True # Give the node two minutes to come back online. retries: 24 delay: 5 - include_tasks: dnsmasq.yml - meta: flush_handlers