diff --git a/run_kraken.py b/run_kraken.py index 37bb25008..043fcf39d 100644 --- a/run_kraken.py +++ b/run_kraken.py @@ -214,31 +214,35 @@ def main(cfg): chaos_telemetry.scenarios.extend(scenario_telemetries) elif scenario_type == "plugin_scenarios": - failed_post_scenarios = plugins.run( + failed_post_scenarios, scenario_telemetries = plugins.run( scenarios_list, kubeconfig_path, kraken_config, failed_post_scenarios, wait_duration, + telemetry ) + chaos_telemetry.scenarios.extend(scenario_telemetries) # krkn_lib_kubernetes elif scenario_type == "container_scenarios": logging.info("Running container scenarios") - failed_post_scenarios = pod_scenarios.container_run( + failed_post_scenarios, scenario_telemetries = pod_scenarios.container_run( kubeconfig_path, scenarios_list, config, failed_post_scenarios, wait_duration, - kubecli + kubecli, + telemetry ) + chaos_telemetry.scenarios.extend(scenario_telemetries) # Inject node chaos scenarios specified in the config # krkn_lib_kubernetes elif scenario_type == "node_scenarios": logging.info("Running node scenarios") - nodeaction.run(scenarios_list, config, wait_duration, kubecli) - + scenario_telemetries = nodeaction.run(scenarios_list, config, wait_duration, kubecli, telemetry) + chaos_telemetry.scenarios.extend(scenario_telemetries) # Inject managedcluster chaos scenarios specified in the config # krkn_lib_kubernetes elif scenario_type == "managedcluster_scenarios": @@ -253,7 +257,8 @@ def main(cfg): elif scenario_type == "time_scenarios": if distribution == "openshift": logging.info("Running time skew scenarios") - time_actions.run(scenarios_list, config, wait_duration, kubecli) + failed_post_scenarios, scenario_telemetries = time_actions.run(scenarios_list, config, wait_duration, kubecli, telemetry) + chaos_telemetry.scenarios.extend(scenario_telemetries) else: logging.error( "Litmus scenarios are currently " @@ -302,8 +307,9 @@ def main(cfg): # Inject cluster shutdown scenarios # krkn_lib_kubernetes - elif scenario_type == "cluster_shut_down_scenarios": - shut_down.run(scenarios_list, config, wait_duration, kubecli) + elif scenario_type == "cluster_shut_down_scenarios" : + failed_post_scenarios, scenario_telemetries = shut_down.run(scenarios_list, config, wait_duration, kubecli, telemetry) + chaos_telemetry.scenarios.extend(scenario_telemetries) # Inject namespace chaos scenarios # krkn_lib_kubernetes