From c56a8a535642f5d54579a1c2104fa3017b7e2243 Mon Sep 17 00:00:00 2001 From: Naga Ravi Chaitanya Elluri Date: Wed, 28 Jul 2021 17:00:20 -0400 Subject: [PATCH] Add more tunables for cpu hog scenario This commit exposes the flags to tweak the number of cores and node count to hog during the node-cpu-hog scenario. --- config/config.yaml | 2 +- config/config_performance.yaml | 2 +- .../{node_hog_engine.yaml => node_cpu_hog_engine.yaml} | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) rename scenarios/{node_hog_engine.yaml => node_cpu_hog_engine.yaml} (73%) diff --git a/config/config.yaml b/config/config.yaml index 02189758..f6f4c186 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -20,7 +20,7 @@ kraken: - scenarios/time_scenarios_example.yml - litmus_scenarios: # List of litmus scenarios to load - - https://hub.litmuschaos.io/api/chaos/1.10.0?file=charts/generic/node-cpu-hog/rbac.yaml - - scenarios/node_hog_engine.yaml + - scenarios/node_cpu_hog_engine.yaml - cluster_shut_down_scenarios: - - scenarios/cluster_shut_down_scenario.yml - scenarios/post_action_shut_down.py diff --git a/config/config_performance.yaml b/config/config_performance.yaml index ca30e464..c6e35fed 100644 --- a/config/config_performance.yaml +++ b/config/config_performance.yaml @@ -18,7 +18,7 @@ kraken: - scenarios/time_scenarios_example.yml - litmus_scenarios: # List of litmus scenarios to load - - https://hub.litmuschaos.io/api/chaos/1.10.0?file=charts/generic/node-cpu-hog/rbac.yaml - - scenarios/node_hog_engine.yaml + - scenarios/node_cpu_hog_engine.yaml - cluster_shut_down_scenarios: - - scenarios/cluster_shut_down_scenario.yml - scenarios/post_action_shut_down.py diff --git a/scenarios/node_hog_engine.yaml b/scenarios/node_cpu_hog_engine.yaml similarity index 73% rename from scenarios/node_hog_engine.yaml rename to scenarios/node_cpu_hog_engine.yaml index 7d46ee90..378e9d69 100644 --- a/scenarios/node_hog_engine.yaml +++ b/scenarios/node_cpu_hog_engine.yaml @@ -20,6 +20,15 @@ spec: # set chaos duration (in sec) as desired - name: TOTAL_CHAOS_DURATION value: '60' + + # Number of cores of node CPU to be consumed + - name: NODE_CPU_CORE + value: '' + + # percentage of total nodes to target + - name: NODES_AFFECTED_PERC + value: '' + # ENTER THE COMMA SEPARATED TARGET NODES NAME - name: TARGET_NODES value: ''