From cef4425df380dda5f8df170c2a2c153070eed11a Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Tue, 8 Oct 2024 16:52:38 +0530 Subject: [PATCH 1/8] make local=true by default Signed-off-by: msvinaykumar --- .../crc/BYODB-installation/minikube/kruize-crc-minikube.yaml | 2 +- .../crc/BYODB-installation/openshift/kruize-crc-openshift.yaml | 2 +- .../default-db-included-installation/aks/kruize-crc-aks.yaml | 2 +- .../minikube/kruize-crc-minikube.yaml | 2 +- .../openshift/kruize-crc-openshift.yaml | 2 +- src/main/java/com/autotune/operator/KruizeDeploymentInfo.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml b/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml index 34e122da5..a7231a7f9 100644 --- a/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml +++ b/manifests/crc/BYODB-installation/minikube/kruize-crc-minikube.yaml @@ -33,7 +33,7 @@ data: "savetodb": "true", "dbdriver": "jdbc:postgresql://", "plots": "true", - "local": "false", + "local": "true", "logAllHttpReqAndResp": "true", "hibernate": { "dialect": "org.hibernate.dialect.PostgreSQLDialect", diff --git a/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml b/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml index 2528656be..47369fba1 100644 --- a/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml +++ b/manifests/crc/BYODB-installation/openshift/kruize-crc-openshift.yaml @@ -46,7 +46,7 @@ data: "savetodb": "true", "dbdriver": "jdbc:postgresql://", "plots": "true", - "local": "false", + "local": "true", "logAllHttpReqAndResp": "true", "hibernate": { "dialect": "org.hibernate.dialect.PostgreSQLDialect", diff --git a/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml b/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml index 5d7231b80..0ba40033c 100644 --- a/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml +++ b/manifests/crc/default-db-included-installation/aks/kruize-crc-aks.yaml @@ -97,7 +97,7 @@ data: "savetodb": "true", "dbdriver": "jdbc:postgresql://", "plots": "true", - "local": "false", + "local": "true", "logAllHttpReqAndResp": "true", "hibernate": { "dialect": "org.hibernate.dialect.PostgreSQLDialect", diff --git a/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml b/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml index e8fe59ea8..24c8483c8 100644 --- a/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml +++ b/manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml @@ -111,7 +111,7 @@ data: "savetodb": "true", "dbdriver": "jdbc:postgresql://", "plots": "true", - "local": "false", + "local": "true", "logAllHttpReqAndResp": "true", "hibernate": { "dialect": "org.hibernate.dialect.PostgreSQLDialect", diff --git a/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml b/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml index 1f73ae042..9f8527836 100644 --- a/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml +++ b/manifests/crc/default-db-included-installation/openshift/kruize-crc-openshift.yaml @@ -105,7 +105,7 @@ data: "savetodb": "true", "dbdriver": "jdbc:postgresql://", "plots": "true", - "local": "false", + "local": "true", "logAllHttpReqAndResp": "true", "hibernate": { "dialect": "org.hibernate.dialect.PostgreSQLDialect", diff --git a/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java b/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java index 4be00ff62..c531a31e7 100644 --- a/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java +++ b/src/main/java/com/autotune/operator/KruizeDeploymentInfo.java @@ -77,7 +77,7 @@ public class KruizeDeploymentInfo { public static Boolean settings_save_to_db; public static String em_only_mode; public static Integer bulk_update_results_limit = 100; - public static Boolean local = false; + public static Boolean local = true; public static Boolean log_http_req_resp = false; public static int generate_recommendations_date_range_limit_in_days = 15; From ea38c23f4445e2a3780850cd8f72c4cd48c9a079 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Tue, 15 Oct 2024 11:45:36 +0530 Subject: [PATCH 2/8] testing local Monitor Signed-off-by: msvinaykumar --- .github/workflows/test-on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-on-pr.yaml b/.github/workflows/test-on-pr.yaml index 0453557e7..50f2551e3 100644 --- a/.github/workflows/test-on-pr.yaml +++ b/.github/workflows/test-on-pr.yaml @@ -114,7 +114,7 @@ jobs: cat ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml cd tests echo "PR_NUMBER = ${{ env.pr_number }}" - ./test_autotune.sh -c minikube -i autotune_operator:pr_${{ env.pr_number }} --testsuite=remote_monitoring_tests --testcase=test_e2e --resultsdir=${GITHUB_WORKSPACE} + ./test_autotune.sh -c minikube -i autotune_operator:pr_${{ env.pr_number }} --testsuite=local_monitoring_tests --testcase=test_e2e --resultsdir=${GITHUB_WORKSPACE} - name: Capture ffdc logs if: always() run: | From 60eb957808ba8c8d6f5785e7f23a7b6da1d489a5 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Tue, 15 Oct 2024 13:42:08 +0530 Subject: [PATCH 3/8] testing local Monitor Signed-off-by: msvinaykumar --- .github/workflows/test-on-pr.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-on-pr.yaml b/.github/workflows/test-on-pr.yaml index 50f2551e3..0453557e7 100644 --- a/.github/workflows/test-on-pr.yaml +++ b/.github/workflows/test-on-pr.yaml @@ -114,7 +114,7 @@ jobs: cat ./manifests/crc/default-db-included-installation/minikube/kruize-crc-minikube.yaml cd tests echo "PR_NUMBER = ${{ env.pr_number }}" - ./test_autotune.sh -c minikube -i autotune_operator:pr_${{ env.pr_number }} --testsuite=local_monitoring_tests --testcase=test_e2e --resultsdir=${GITHUB_WORKSPACE} + ./test_autotune.sh -c minikube -i autotune_operator:pr_${{ env.pr_number }} --testsuite=remote_monitoring_tests --testcase=test_e2e --resultsdir=${GITHUB_WORKSPACE} - name: Capture ffdc logs if: always() run: | From 7481847d379621c938adb71d2cf676981c8ce6d2 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Tue, 15 Oct 2024 18:51:05 +0530 Subject: [PATCH 4/8] set local=false patch for github checks Signed-off-by: msvinaykumar --- .../scripts/remote_monitoring_tests/remote_monitoring_tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh b/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh index ab1d74e92..2b2964958 100755 --- a/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh +++ b/tests/scripts/remote_monitoring_tests/remote_monitoring_tests.sh @@ -61,6 +61,8 @@ function remote_monitoring_tests() { if [ ${skip_setup} -eq 0 ]; then echo "Setting up kruize..." | tee -a ${LOG} echo "${KRUIZE_SETUP_LOG}" + echo "setting local=false" + kruize_remote_patch setup "${KRUIZE_POD_LOG}" >> ${KRUIZE_SETUP_LOG} 2>&1 echo "Setting up kruize...Done" | tee -a ${LOG} From dd5746c338769f5cba3f797bbb5c308be90c5ad7 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Tue, 15 Oct 2024 18:57:40 +0530 Subject: [PATCH 5/8] set local=false patch for github checks Signed-off-by: msvinaykumar --- tests/scripts/common/common_functions.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/scripts/common/common_functions.sh b/tests/scripts/common/common_functions.sh index 3333305af..ba7cfa293 100755 --- a/tests/scripts/common/common_functions.sh +++ b/tests/scripts/common/common_functions.sh @@ -1902,6 +1902,22 @@ function kruize_local_patch() { fi } +# +# "local" flag is turned off for RM. +# +function kruize_remote_patch() { + CRC_DIR="./manifests/crc/default-db-included-installation" + KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT="${CRC_DIR}/openshift/kruize-crc-openshift.yaml" + KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE="${CRC_DIR}/minikube/kruize-crc-minikube.yaml" + + + if [ ${cluster_type} == "minikube" ]; then + sed -i 's/"local": "false"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE} + elif [ ${cluster_type} == "openshift" ]; then + sed -i 's/"local": "false"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT} + fi +} + # # Modify "serviceName" and "namespace" datasource manifest fields based on input parameters # From 42098c83ffab443274cadacb3fdb4d1cba812903 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Wed, 16 Oct 2024 10:55:13 +0530 Subject: [PATCH 6/8] set local=false patch for github checks Signed-off-by: msvinaykumar --- tests/scripts/common/common_functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scripts/common/common_functions.sh b/tests/scripts/common/common_functions.sh index ba7cfa293..93e731721 100755 --- a/tests/scripts/common/common_functions.sh +++ b/tests/scripts/common/common_functions.sh @@ -1912,9 +1912,9 @@ function kruize_remote_patch() { if [ ${cluster_type} == "minikube" ]; then - sed -i 's/"local": "false"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE} + sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE} elif [ ${cluster_type} == "openshift" ]; then - sed -i 's/"local": "false"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT} + sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT} fi } From 6ab4153b8e50367038cc98822405e0c05fa76482 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Wed, 16 Oct 2024 12:46:13 +0530 Subject: [PATCH 7/8] set local=false patch for github checks Signed-off-by: msvinaykumar --- .../remote_monitoring_fault_tolerant_tests.sh | 1 + .../scale_test/remote_monitoring_scale_test.sh | 2 ++ .../scale_test/remote_monitoring_scale_test_bulk.sh | 2 ++ .../stress_test/remote_monitoring_stress_test.sh | 2 ++ 4 files changed, 7 insertions(+) diff --git a/tests/scripts/remote_monitoring_tests/fault_tolerant_tests/remote_monitoring_fault_tolerant_tests.sh b/tests/scripts/remote_monitoring_tests/fault_tolerant_tests/remote_monitoring_fault_tolerant_tests.sh index 9b234d829..85b7d4826 100755 --- a/tests/scripts/remote_monitoring_tests/fault_tolerant_tests/remote_monitoring_fault_tolerant_tests.sh +++ b/tests/scripts/remote_monitoring_tests/fault_tolerant_tests/remote_monitoring_fault_tolerant_tests.sh @@ -100,6 +100,7 @@ KRUIZE_SETUP_LOG="${LOG_DIR}/kruize_setup.log" # Setup kruize echo "Setting up kruize..." | tee -a ${LOG} +kruize_remote_patch pushd ${KRUIZE_REPO} > /dev/null echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG} ./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1 diff --git a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test.sh b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test.sh index 7c7631a85..427fe8aba 100755 --- a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test.sh +++ b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test.sh @@ -123,6 +123,8 @@ KRUIZE_SERVICE_LOG="${LOG_DIR}/kruize_service.log" # Setup kruize echo "Setting up kruize..." | tee -a ${LOG} +echo "setting local=false" +kruize_remote_patch pushd ${KRUIZE_REPO} > /dev/null echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG} ./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1 diff --git a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh index 210bbd5b1..9f854f073 100755 --- a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh +++ b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh @@ -149,6 +149,8 @@ KRUIZE_SERVICE_LOG="${LOG_DIR}/kruize_service.log" # Setup kruize if [ ${kruize_setup} == true ]; then echo "Setting up kruize..." | tee -a ${LOG} + echo "setting local=false" + kruize_remote_patch pushd ${KRUIZE_REPO} > /dev/null echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG} ./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1 diff --git a/tests/scripts/remote_monitoring_tests/stress_test/remote_monitoring_stress_test.sh b/tests/scripts/remote_monitoring_tests/stress_test/remote_monitoring_stress_test.sh index 7a32875f3..98bb2c6fe 100755 --- a/tests/scripts/remote_monitoring_tests/stress_test/remote_monitoring_stress_test.sh +++ b/tests/scripts/remote_monitoring_tests/stress_test/remote_monitoring_stress_test.sh @@ -130,6 +130,8 @@ jmeter_setup echo "Invoking jmeter setup...done" | tee -a ${LOG} echo "Setting up kruize..." | tee -a ${LOG} +echo "setting local=false" +kruize_remote_patch pushd ${KRUIZE_REPO} > /dev/null echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${LOG_DIR}/kruize_setup.log" ./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${LOG_DIR}/kruize_setup.log 2>&1 From 8ca51b8c9bb1391801ab75ef8cca4b6942302f50 Mon Sep 17 00:00:00 2001 From: msvinaykumar Date: Wed, 16 Oct 2024 12:49:48 +0530 Subject: [PATCH 8/8] set local=false patch for github checks Signed-off-by: msvinaykumar --- .../scale_test/remote_monitoring_scale_test_bulk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh index 9f854f073..ac48235b4 100755 --- a/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh +++ b/tests/scripts/remote_monitoring_tests/scale_test/remote_monitoring_scale_test_bulk.sh @@ -150,7 +150,7 @@ KRUIZE_SERVICE_LOG="${LOG_DIR}/kruize_service.log" if [ ${kruize_setup} == true ]; then echo "Setting up kruize..." | tee -a ${LOG} echo "setting local=false" - kruize_remote_patch + kruize_remote_patch pushd ${KRUIZE_REPO} > /dev/null echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG} ./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1