From bbd92a449fc693b094d4a74c192184500b1c5798 Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Wed, 20 Mar 2024 17:58:24 +0200 Subject: [PATCH 1/6] save events from failed workspaces --- tests/performance/load-tests/load-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/performance/load-tests/load-test.sh b/tests/performance/load-tests/load-test.sh index c03ae596380..c173312496f 100755 --- a/tests/performance/load-tests/load-test.sh +++ b/tests/performance/load-tests/load-test.sh @@ -107,8 +107,10 @@ function runTest() { succeeded=$((succeeded + 1)) else print_error "Timeout waiting for dw$i to become ready or an error occurred." + ws_name=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') kubectl describe dw dw$i >logs/dw$i-log.log - kubectl logs $(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') >logs/dw$i-pod.log || true + kubectl get events | grep $ws_name >logs/dw$i-events.log + kubectl logs $ws_name >logs/dw$i-pod.log || true fi done From 804ac5925f104c02df4e9d33d9739f5b1ec17d84 Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Thu, 21 Mar 2024 13:14:37 +0200 Subject: [PATCH 2/6] get only pods events --- tests/performance/load-tests/load-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/performance/load-tests/load-test.sh b/tests/performance/load-tests/load-test.sh index c173312496f..47dd145b82b 100755 --- a/tests/performance/load-tests/load-test.sh +++ b/tests/performance/load-tests/load-test.sh @@ -109,7 +109,7 @@ function runTest() { print_error "Timeout waiting for dw$i to become ready or an error occurred." ws_name=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') kubectl describe dw dw$i >logs/dw$i-log.log - kubectl get events | grep $ws_name >logs/dw$i-events.log + kubectl get events --field-selector involvedObject.kind=Pod | grep $ws_name >logs/dw$i-events.log kubectl logs $ws_name >logs/dw$i-pod.log || true fi done From 70f37b6b99ad48fab6f8371193575a3a3d9097a7 Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Thu, 21 Mar 2024 15:34:09 +0200 Subject: [PATCH 3/6] save events to events.log file --- tests/performance/load-tests/load-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/performance/load-tests/load-test.sh b/tests/performance/load-tests/load-test.sh index 47dd145b82b..898faa0a32a 100755 --- a/tests/performance/load-tests/load-test.sh +++ b/tests/performance/load-tests/load-test.sh @@ -91,6 +91,8 @@ function runTest() { # Create logs directory mkdir logs || true + kubectl get events --field-selector involvedObject.kind=Pod >logs/events.log + total_time=0 succeeded=0 echo "Calculate average workspaces starting time" @@ -109,7 +111,7 @@ function runTest() { print_error "Timeout waiting for dw$i to become ready or an error occurred." ws_name=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') kubectl describe dw dw$i >logs/dw$i-log.log - kubectl get events --field-selector involvedObject.kind=Pod | grep $ws_name >logs/dw$i-events.log + cat logs/events.log | grep $ws_name >logs/dw$i-events.log kubectl logs $ws_name >logs/dw$i-pod.log || true fi done From addb765c7337443e51c9f6357eb8e835f860505c Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Thu, 21 Mar 2024 16:01:02 +0200 Subject: [PATCH 4/6] add comment --- tests/performance/load-tests/devworkspace.yaml | 9 --------- tests/performance/load-tests/load-test.sh | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/performance/load-tests/devworkspace.yaml b/tests/performance/load-tests/devworkspace.yaml index 3efa0962aa4..301a93ba360 100644 --- a/tests/performance/load-tests/devworkspace.yaml +++ b/tests/performance/load-tests/devworkspace.yaml @@ -11,12 +11,3 @@ spec: - name: dev container: image: quay.io/devfile/universal-developer-image:latest - contributions: - - name: che-code - uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml - components: - - name: che-code-runtime-description - container: - env: - - name: CODE_HOST - value: 0.0.0.0 diff --git a/tests/performance/load-tests/load-test.sh b/tests/performance/load-tests/load-test.sh index 898faa0a32a..646ad00c85a 100755 --- a/tests/performance/load-tests/load-test.sh +++ b/tests/performance/load-tests/load-test.sh @@ -91,6 +91,7 @@ function runTest() { # Create logs directory mkdir logs || true + # Get all events kubectl get events --field-selector involvedObject.kind=Pod >logs/events.log total_time=0 From 2abb22ad9a0fb3f0a2abb25fa58dbb04daed12b7 Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Thu, 21 Mar 2024 17:12:49 +0200 Subject: [PATCH 5/6] return devworskpace.yaml content --- tests/performance/load-tests/devworkspace.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/performance/load-tests/devworkspace.yaml b/tests/performance/load-tests/devworkspace.yaml index 301a93ba360..3efa0962aa4 100644 --- a/tests/performance/load-tests/devworkspace.yaml +++ b/tests/performance/load-tests/devworkspace.yaml @@ -11,3 +11,12 @@ spec: - name: dev container: image: quay.io/devfile/universal-developer-image:latest + contributions: + - name: che-code + uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml + components: + - name: che-code-runtime-description + container: + env: + - name: CODE_HOST + value: 0.0.0.0 From bb87252f1136a72ff9c750a7c3b7edeb997d51ea Mon Sep 17 00:00:00 2001 From: Skoryk Serhii Date: Fri, 22 Mar 2024 15:51:49 +0200 Subject: [PATCH 6/6] don't get logs from failed workspaces --- tests/performance/load-tests/load-test.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/performance/load-tests/load-test.sh b/tests/performance/load-tests/load-test.sh index 646ad00c85a..b4822fa236f 100755 --- a/tests/performance/load-tests/load-test.sh +++ b/tests/performance/load-tests/load-test.sh @@ -110,10 +110,9 @@ function runTest() { succeeded=$((succeeded + 1)) else print_error "Timeout waiting for dw$i to become ready or an error occurred." - ws_name=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') - kubectl describe dw dw$i >logs/dw$i-log.log - cat logs/events.log | grep $ws_name >logs/dw$i-events.log - kubectl logs $ws_name >logs/dw$i-pod.log || true + devworkspace_id=$(kubectl get dw dw$i --template='{{.status.devworkspaceId}}') + kubectl describe dw dw$i >logs/dw$i-describe.log + cat logs/events.log | grep $devworkspace_id >logs/dw$i-$devworkspace_id-events.log fi done