<commit_before>---
# input variables:
# - openshift_service_type
# - openshift.common.hostname
# - openshift_master_api_port

# NOTE: This is needed to make sure we are using the correct set
#       of systemd unit files. The RPMs lay down defaults but
#       the install/upgrade may override them in /etc/systemd/system/.
# NOTE: We don't use the systemd module as some versions of the module
#       require a service to be part of the call.
- name: Reload systemd to ensure latest unit files
  command: systemctl daemon-reload

- name: Restart support services
  service:
    name: "{{ item }}"
    state: started
    enabled: True
  with_items:
    - NetworkManager
    - dnsmasq

- name: Restart container runtime
  service:
    name: "{{ openshift_docker_service_name }}"
    state: started
  register: docker_start_result
  until: not (docker_start_result is failed)
  retries: 3
  delay: 30

- name: Restart cri-o
  service:
    name: cri-o
    state: started
  when: openshift_use_crio | default(False)

- name: Start node service
  service:
    name: "{{ openshift_service_type }}-node"
    state: started
  async: 100
  poll: 0
  register: node_service
  failed_when: false

- name: Approve the node
  oc_adm_csr:
    nodes: ["{{ openshift.node.nodename }}"]
    timeout: 60
    fail_on_timeout: true
  delegate_to: "{{ groups.oo_first_master.0 }}"

- name: Check status of node service
  async_status:
    jid: "{{ node_service.ansible_job_id }}"
  register: job_result
  until: job_result.finished
  retries: 30

- name: Wait for master API to come back online
  wait_for:
    host: "{{ openshift.common.hostname }}"
    state: started
    delay: 10
    port: "{{ openshift_master_api_port }}"
    timeout: 600
  when: inventory_hostname in groups.oo_masters_to_config<commit_msg>Align node startup async tasks with the ExecStartTimeout value<commit_after>---
# input variables:
# - openshift_service_type
# - openshift.common.hostname
# - openshift_master_api_port

# NOTE: This is needed to make sure we are using the correct set
#       of systemd unit files. The RPMs lay down defaults but
#       the install/upgrade may override them in /etc/systemd/system/.
# NOTE: We don't use the systemd module as some versions of the module
#       require a service to be part of the call.
- name: Reload systemd to ensure latest unit files
  command: systemctl daemon-reload

- name: Restart support services
  service:
    name: "{{ item }}"
    state: started
    enabled: True
  with_items:
    - NetworkManager
    - dnsmasq

- name: Restart container runtime
  service:
    name: "{{ openshift_docker_service_name }}"
    state: started
  register: docker_start_result
  until: not (docker_start_result is failed)
  retries: 3
  delay: 30

- name: Restart cri-o
  service:
    name: cri-o
    state: started
  when: openshift_use_crio | default(False)

- name: Start node service
  service:
    name: "{{ openshift_service_type }}-node"
    state: started
  async: 300
  poll: 0
  register: node_service
  failed_when: false

- name: Approve the node
  oc_adm_csr:
    nodes: ["{{ openshift.node.nodename }}"]
    timeout: 60
    fail_on_timeout: true
  delegate_to: "{{ groups.oo_first_master.0 }}"

- name: Check status of node service
  async_status:
    jid: "{{ node_service.ansible_job_id }}"
  register: job_result
  until: job_result.finished
  retries: 30
  delay: 10

- name: Wait for master API to come back online
  wait_for:
    host: "{{ openshift.common.hostname }}"
    state: started
    delay: 10
    port: "{{ openshift_master_api_port }}"
    timeout: 600
  when: inventory_hostname in groups.oo_masters_to_config
{'fraction_non_alphanumeric': 0.08742121129076459, 'fraction_numerical': 0.009865716634694436, 'mean_word_length': 3.3608124253285543, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4255633', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1165, 'n_words': 377}