Raoul Scarazzini 534970198b Apply/Delete latency during HA validation
This commit adds the latency management into the HA validation process.
If a user wants to go trough the HA validation with a specific latency
applied on all the nodes he will pass the "latency_ms" variable with a
value greater than zero and a "latency_eth_interface" variable with the
value related to the device chose for the test.

Change-Id: I3d0f9cc3301ba6be893919b58473f3f4135ea789
2018-07-30 16:57:43 +02:00

13 lines
395 B
YAML

# Manage latency on all nodes
- name: "Manage latency on all nodes"
shell: |
/usr/sbin/tc qdisc {{ latency_action }} dev {{ latency_eth_interface }} root netem delay {{ latency_ms }}ms
delegate_to: "{{ item }}"
become: true
with_items:
- "{{ groups['overcloud'] }}"
when:
- latency_action in [ "add", "del" ]
- latency_eth_interface is defined
- latency_ms|int > 0