Skip to content

Commit

Permalink
ansible-scylla-node: Stop starting seeds in parallel
Browse files Browse the repository at this point in the history
Ever since raft was introduced, starting seeds in parallel sometimes
results in errors due to the other seed being in an unknown gossip
status when the other tries to start.
  • Loading branch information
igorribeiroduarte authored and vladzcloudius committed Feb 1, 2024
1 parent 0642fd7 commit 7e95671
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions ansible-scylla-node/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,20 +326,11 @@
include_tasks: generate_tokens.yml
when: token_distributor is defined

# Start all seeders together since we don't know which one is the "first" - so let them figure it by themselves
- name: start scylla on seeders
service:
name: scylla-server
state: started
become: true
when: broadcast_address in scylla_seeds or inventory_hostname in scylla_seeds

- name: Wait for CQL port on seeders
wait_for:
port: 9042
host: "{{ listen_address }}"
timeout: "{{ scylla_bootstrap_wait_time_sec }}"
when: broadcast_address in scylla_seeds or inventory_hostname in scylla_seeds
- name: Start seeders serially
run_once: true
include_tasks: start_one_node.yml
loop: "{{ groups['scylla'] }}"
when: hostvars[item]['broadcast_address'] in scylla_seeds or item in scylla_seeds

- name: Start scylla non-seeds nodes serially
run_once: true
Expand Down

0 comments on commit 7e95671

Please sign in to comment.