jfrog / JFrog-Cloud-Installers

Template to deploy Artifactory Enterprise cluster.
Apache License 2.0
78 stars 140 forks source link

[ansible/xray] timeout for xray API check is too short. Task fails but service is still activating. #423

Open EmptyByte opened 3 days ago

EmptyByte commented 3 days ago

The following task in Ansible/ansible_collections/jfrog/platform/roles/xray/tasks/install.yml is not waiting long enough before failing. The Xray service was still in activating state. :

- name: Make sure xray is up and running
  ansible.builtin.uri:
    url: http://127.0.0.1:8082/router/api/v1/system/health
    timeout: 130
    status_code: 200
  register: result
  until: result is succeeded
  retries: 25
  delay: 5
  when:
    - not ansible_check_mode
    - xray_start_service | bool

Should be at least 5 minutes or 15..

- name: Make sure xray is up and running
  ansible.builtin.uri:
    url: http://127.0.0.1:8082/router/api/v1/system/health
    timeout: 130
    status_code: 200
  register: result
  until: result is succeeded
  retries: 30
  delay: 10
  when:
    - not ansible_check_mode
    - xray_start_service | bool
EmptyByte commented 3 days ago

Note: happens only on fresh install. Future attempts are faster.