Skip to content

Commit

Permalink
Fix race condition during idxc configuration (#87)
Browse files Browse the repository at this point in the history
* Fix race condition during idxc configuration
  • Loading branch information
Mason Morales authored Aug 12, 2021
1 parent 66525fb commit 33b3996
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions roles/splunk/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@
state: restarted
become: true
when: ansible_os_family != 'RedHat'

- name: wait for splunkd
wait_for:
port: "{{ splunkd_port }}"
state: started
delay: 5
4 changes: 3 additions & 1 deletion roles/splunk/tasks/configure_idxc_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
owner: "{{ splunk_nix_user }}"
group: "{{ splunk_nix_group }}"
become: true
notify: restart splunk
notify:
- restart splunk
- wait for splunkd
loop:
- { option: "mode", value: "{{ mode_value}}" }
- { option: "replication_factor", value: "{{ splunk_idxc_rf }}" }
Expand Down
3 changes: 3 additions & 0 deletions roles/splunk/tasks/configure_idxc_member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
failed_when: idxc_peer_init_result.rc != 0
notify: restart splunk
no_log: true
until: idxc_peer_init_result.rc == 0
retries: 6
delay: 5

0 comments on commit 33b3996

Please sign in to comment.