Skip to content

Commit

Permalink
ansible-scylla-node: Remove run_once from io_properties block
Browse files Browse the repository at this point in the history
Assuming `scylla_io_probe == true`, this `run_once` had the following logic:
  * If `scylla_io_probe_dc_aware` was false, the block would run only once and
    copy the io_properties from the first node to all the others
  * If it was true the block would run for all the hosts and every node
    would measure its own io_properties

However, having `scylla_io_probe_dc_aware` set to false means that we don't know
if the nodes configuration will be the same, meaning that we'd rather measure
io_properties per node than copy it from the first node.

This PR fixes this problem by removing the `run_once`.

Now, we'll only copy io_properties to other nodes in the following scenarios:
  * if both, `scylla_io_probe` and `scylla_io_probe_dc_aware` are set to `true`,
    then we copy the io_properties from the first node of each DC to all the
    others of the same DC.
  * if io_properties is explicitly set via ansible params, its value will be
    copied to the nodes of all DCs.
  • Loading branch information
igorribeiroduarte committed Feb 8, 2024
1 parent 2cc532d commit a986485
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ansible-scylla-node/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
- set_fact:
io_conf: "{{ _io_conf.stdout_lines[0] }}"
when: scylla_io_probe|bool == True and (scylla_io_probe_dc_aware|bool == False or dc_to_node_list[dc][0] == inventory_hostname)
run_once: "{{ not scylla_io_probe_dc_aware|bool }}"
become: true

- name: For every node, check if io.conf already exists and if it's not empty
Expand Down

0 comments on commit a986485

Please sign in to comment.