Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EmptyByte opened this issue Oct 28, 2024 · 3 comments

Comments

@EmptyByte
Copy link

EmptyByte commented Oct 28, 2024

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
Copy link
Author

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

@EmptyByte EmptyByte changed the title [ansible/xray] timeout for xray API check is too short. Tasks fails but service is still activating. [ansible/xray] timeout for xray API check is too short. Task fails but service is still activating. Oct 28, 2024
@chukka
Copy link
Collaborator

chukka commented Nov 18, 2024

Thanks for raising this! Do you have any insights into how many seconds it took for the fresh install to connect successfully? We're trying to understand if this issue is isolated to just one environment or if it occurs consistently across others.

@EmptyByte
Copy link
Author

Hi @chukka, I don't remember exactly but it took some time, I would say close to 5 minutes. Nonetheless, if you configure 5 minutes, this is a max and the task will finish earlier or timeout when 5 minutes were elapsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants