From 19cc2c047f8edd9cab02797e84dedd7e2f380779 Mon Sep 17 00:00:00 2001 From: Sahil Shah Date: Fri, 21 Jul 2023 12:13:44 -0400 Subject: [PATCH] Fix for pvc scenario --- kraken/pvc/pvc_scenario.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kraken/pvc/pvc_scenario.py b/kraken/pvc/pvc_scenario.py index e1ab23be..95119716 100644 --- a/kraken/pvc/pvc_scenario.py +++ b/kraken/pvc/pvc_scenario.py @@ -128,7 +128,6 @@ def run(scenarios_list, config, kubecli: krkn_lib_kubernetes.KrknLibKubernetes): pod_name, namespace, container_name, - "sh" ) ).split() pvc_used_kb = int(command_output[2]) @@ -186,14 +185,14 @@ def run(scenarios_list, config, kubecli: krkn_lib_kubernetes.KrknLibKubernetes): "Create temp file in the PVC command:\n %s" % command ) kubecli.exec_cmd_in_pod( - command, pod_name, namespace, container_name, "sh" + command, pod_name, namespace, container_name ) # Check if file is created command = "ls -lh %s" % (str(mount_path)) logging.debug("Check file is created command:\n %s" % command) response = kubecli.exec_cmd_in_pod( - command, pod_name, namespace, container_name, "sh" + command, pod_name, namespace, container_name ) logging.info("\n" + str(response)) if str(file_name).lower() in str(response).lower(): @@ -260,15 +259,14 @@ def remove_temp_file( ): command = "rm -f %s" % (str(full_path)) logging.debug("Remove temp file from the PVC command:\n %s" % command) - kubecli.exec_cmd_in_pod(command, pod_name, namespace, container_name, "sh") + kubecli.exec_cmd_in_pod(command, pod_name, namespace, container_name) command = "ls -lh %s" % (str(mount_path)) logging.debug("Check temp file is removed command:\n %s" % command) response = kubecli.exec_cmd_in_pod( command, pod_name, namespace, - container_name, - "sh" + container_name ) logging.info("\n" + str(response)) if not (str(file_name).lower() in str(response).lower()):