-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Test] Save events from failed workspaces in load-tests script #22888
Changes from 5 commits
bbd92a4
804ac59
70f37b6
addb765
2abb22a
bb87252
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,9 @@ 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 | ||
succeeded=0 | ||
echo "Calculate average workspaces starting time" | ||
|
@@ -107,8 +110,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 | ||
cat logs/events.log | grep $ws_name >logs/dw$i-events.log | ||
SkorikSergey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
kubectl logs $ws_name >logs/dw$i-pod.log || true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not the same. Get events in 95 line saves all events to file. And after that all failed pod logs getting from events file. It saves time - don't need to ask Openshift cluster for events of every failed workspace(just once). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant, the same comment as for https://github.com/eclipse/che/pull/22888/files#r1535549399 |
||
fi | ||
done | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
devworkspaceId
!=actual workspace name
, then I would recommend to name variable correspondingly asdevworkspace_id
to avoid confusion.