Skip to content

Script to inject latencies based upon user-define intrarole and iterrole latencies

License

Notifications You must be signed in to change notification settings

mbaldessari/tripleo-latency-injector

Repository files navigation

tripleo-latency-injector

Script to inject latencies based upon user-define intrarole and iterrole latencies

Run the command like this: ./generateqos.py cloud-inventory.yaml cloud-latencies.yaml

cloud-inventory.yaml should be a yaml inventory as generated by the following command:

tripleo-ansible-inventory --static-yaml-inventory cloud-inventory.yaml

cloud-latencies.yaml is a YAML file containing the latencies definitions:

#DefaultLatency: 5ms
IntraRoleLatency:
  Controller: 20ms
  Compute: 10ms
  CephStorage: 2ms
InterRoleLatency:
  Controller_Compute: 100ms
  Compute_CephStorage: 200ms
  Controller_CephStorage: 300ms

The above config file will generate the following latencies:

  • 30ms amongst each Controller node
  • 10ms amongst each Compute node
  • 2ms amongst each CephStorage node
  • 100ms between Controllers and Computes
  • 200ms between Computes and CephStorage nodes
  • 300ms between Controller and CephStorage nodes

Note that you could uncomment the DefaultLatency and it would be the latency for anything not matched by Intra and Inter Role latencies.

Once the ./generateqos.py script is run under the output folder you will find the output/distribute-tc-scripts.sh script. Run it and it will copy all the right tc scripts to all nodes and it will run said script to inject the latencies.

After running the distribute-tc-scripts.sh you will be able to confirm the new latencies:

[root@compute-0 ~]# ping controller-0
PING controller-0.localdomain (172.17.1.16) 56(84) bytes of data.
64 bytes from controller-0.localdomain (172.17.1.16): icmp_seq=1 ttl=64 time=100 ms
64 bytes from controller-0.localdomain (172.17.1.16): icmp_seq=2 ttl=64 time=100 ms

If you want to remove those latencies on each node run the script /root/<nodename>-tc.sh --reset

About

Script to inject latencies based upon user-define intrarole and iterrole latencies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published