Skip to content

Commit 33b3996

Browse files
author
Mason Morales
authored
Fix race condition during idxc configuration (#87)
* Fix race condition during idxc configuration
1 parent 66525fb commit 33b3996

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

roles/splunk/handlers/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,9 @@
8282
state: restarted
8383
become: true
8484
when: ansible_os_family != 'RedHat'
85+
86+
- name: wait for splunkd
87+
wait_for:
88+
port: "{{ splunkd_port }}"
89+
state: started
90+
delay: 5

roles/splunk/tasks/configure_idxc_manager.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
owner: "{{ splunk_nix_user }}"
2121
group: "{{ splunk_nix_group }}"
2222
become: true
23-
notify: restart splunk
23+
notify:
24+
- restart splunk
25+
- wait for splunkd
2426
loop:
2527
- { option: "mode", value: "{{ mode_value}}" }
2628
- { option: "replication_factor", value: "{{ splunk_idxc_rf }}" }

roles/splunk/tasks/configure_idxc_member.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
failed_when: idxc_peer_init_result.rc != 0
2020
notify: restart splunk
2121
no_log: true
22+
until: idxc_peer_init_result.rc == 0
23+
retries: 6
24+
delay: 5

0 commit comments

Comments
 (0)