From 9f23699cfa3a0a0d9b1f000bdcc797021cfa6e46 Mon Sep 17 00:00:00 2001 From: Naga Ravi Chaitanya Elluri Date: Wed, 31 Aug 2022 20:15:35 -0400 Subject: [PATCH] Document node scenario actions for VMware This commit also updates the id's for the VMware scenarios to be aligned with other cloud providers. --- docs/node_scenarios.md | 5 +++-- kraken/plugins/vmware/vmware_plugin.py | 8 ++++---- scenarios/openshift/vmware_node_scenarios.yml | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/node_scenarios.md b/docs/node_scenarios.md index e6932fde..e3305d05 100644 --- a/docs/node_scenarios.md +++ b/docs/node_scenarios.md @@ -4,7 +4,7 @@ The following node chaos scenarios are supported: 1. **node_start_scenario**: Scenario to stop the node instance. 2. **node_stop_scenario**: Scenario to stop the node instance. -3. **node_stop_start_scenario**: Scenario to stop and then start the node instance. +3. **node_stop_start_scenario**: Scenario to stop and then start the node instance. Not supported on VMware. 4. **node_termination_scenario**: Scenario to terminate the node instance. 5. **node_reboot_scenario**: Scenario to reboot the node instance. 6. **stop_kubelet_scenario**: Scenario to stop the kubelet of the node instance. @@ -12,11 +12,12 @@ The following node chaos scenarios are supported: 8. **node_crash_scenario**: Scenario to crash the node instance. 9. **stop_start_helper_node_scenario**: Scenario to stop and start the helper node and check service status. + **NOTE**: If the node does not recover from the node_crash_scenario injection, reboot the node to get it back to Ready state. **NOTE**: node_start_scenario, node_stop_scenario, node_stop_start_scenario, node_termination_scenario , node_reboot_scenario and stop_start_kubelet_scenario are supported only on AWS, Azure, OpenStack, BareMetal, GCP -, and Alibaba as of now. +, VMware and Alibaba as of now. **NOTE**: Node scenarios are supported only when running the standalone version of Kraken until https://github.com/redhat-chaos/krkn/issues/106 gets fixed. diff --git a/kraken/plugins/vmware/vmware_plugin.py b/kraken/plugins/vmware/vmware_plugin.py index beb89cb6..9996ee3c 100644 --- a/kraken/plugins/vmware/vmware_plugin.py +++ b/kraken/plugins/vmware/vmware_plugin.py @@ -534,7 +534,7 @@ class NodeScenarioConfig: @plugin.step( - id="node-start", + id="node_start_scenario", name="Start the node", description="Start the node(s) by starting the VMware VM " "on which the node is configured", @@ -593,7 +593,7 @@ def node_start( @plugin.step( - id="node-stop", + id="node_stop_scenario", name="Stop the node", description="Stop the node(s) by starting the VMware VM " "on which the node is configured", @@ -652,7 +652,7 @@ def node_stop( @plugin.step( - id="node-reboot", + id="node_reboot_scenario", name="Reboot VMware VM", description="Reboot the node(s) by starting the VMware VM " "on which the node is configured", @@ -713,7 +713,7 @@ def node_reboot( @plugin.step( - id="node-terminate", + id="node_terminate_scenario", name="Reboot VMware VM", description="Wait for the specified number of pods to be present", outputs={ diff --git a/scenarios/openshift/vmware_node_scenarios.yml b/scenarios/openshift/vmware_node_scenarios.yml index 9502d0e0..6d3c51c0 100644 --- a/scenarios/openshift/vmware_node_scenarios.yml +++ b/scenarios/openshift/vmware_node_scenarios.yml @@ -1,5 +1,5 @@ # yaml-language-server: $schema=../plugin.schema.json -- id: +- id: config: name: # Node on which scenario has to be injected; can set multiple names separated by comma label_selector: # When node_name is not specified, a node with matching label_selector is selected for node chaos scenario injection @@ -7,4 +7,4 @@ instance_count: 1 # Number of nodes to perform action/select that match the label selector timeout: 300 # Duration to wait for completion of node scenario injection verify_session: True # Set to True if you want to verify the vSphere client session using certificates; else False - skip_openshift_checks: False # Set to True if you don't want to wait for the status of the nodes to change on OpenShift before passing the scenario \ No newline at end of file + skip_openshift_checks: False # Set to True if you don't want to wait for the status of the nodes to change on OpenShift before passing the scenario