代码拉取完成,页面将自动刷新
---
#This is the entry file of this chaos injection tool. different chaos type & node combinations will be selected.
#All of the parameter setting needs to be done in group_vars/all file when performing the offical stability test organized by CAICT
#copyright @CAICT
#setting up experiment, copy and unarchive chaos injection tool to cluster to be tested
- hosts: test
remote_user: root
roles:
- role: experiment_setup
tags: "always"
#testing, localhost has been used as scheduler to send command to cluster to be tested, and inject different type of chaos to varies of node combination.
- hosts: localhost
tasks:
#inject random chaos
- name: executing test with random chaos
command: "ansible-playbook testgroup.yml --tags={{(chaos_combinations|shuffle)[0]}} --extra-vars '{\"i\":{{injected_node_number|int}} }' "
async: "{{period}}"
poll: "{{period}}"
with_sequence: start=1 end={{max_peak_number|int}} stride=1 format="peak No.%d chaos type:{{test_case}}, number of nodes injected:{{injected_node_number}}"
when: test_case == "random"
#inject specific chaos
- name: executing test with specific chaos
command: "ansible-playbook testgroup.yml --tags={{test_case}} --extra-vars '{\"i\":{{injected_node_number|int}} }' "
async: "{{period}}"
poll: "{{period}}"
with_sequence: start=1 end={{max_peak_number|int}} stride=1 format="peak No.%d chaos type:{{test_case}}, number of nodes injected:{{injected_node_number}}"
when: test_case != "random"
#cleaning the environment.
- hosts: test
remote_user: root
roles:
- role: cleaning
tags: "always"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。