-
Notifications
You must be signed in to change notification settings - Fork 28
Debugging tools #125
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
Debugging tools #125
Conversation
jzhou77
left a comment
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.
Nice!
johscheuer
left a comment
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.
In general LGTM 👍
joshua_remote_cli.sh
Outdated
| if [ "$SCALER_TYPE" = "rhel9" ]; then | ||
| SCALER_POD=$(kubectl --context "$CONTEXT" get pods | grep agent-scaler | grep rhel9 | head -1 | awk '{print $1}') | ||
| else | ||
| SCALER_POD=$(kubectl --context "$CONTEXT" get pods | grep agent-scaler | grep -v rhel9 | head -1 | awk '{print $1}') |
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.
| SCALER_POD=$(kubectl --context "$CONTEXT" get pods | grep agent-scaler | grep -v rhel9 | head -1 | awk '{print $1}') | |
| SCALER_POD=$(kubectl --context "${CONTEXT}" get pods -l app=agent-scaler -o jsonpath='{.items[0].metadata.name}') |
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.
Skipping this. What I have is ugly and could be prettier but works... Need to pick the rhel9 or the regular or the rhel9 scaler.
joshua_remote_cli.sh
Outdated
| fi | ||
|
|
||
| if [ "$SCALER_TYPE" = "rhel9" ]; then | ||
| SCALER_POD=$(kubectl --context "$CONTEXT" get pods | grep agent-scaler | grep rhel9 | head -1 | awk '{print $1}') |
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.
| SCALER_POD=$(kubectl --context "$CONTEXT" get pods | grep agent-scaler | grep rhel9 | head -1 | awk '{print $1}') | |
| SCALER_POD=$(kubectl --context "${CONTEXT}" get pods -l app=agent-scaler-rhel9 -o jsonpath='{.items[0].metadata.name}') |
Another option would be to define the label selector in $SCALER_TYPE (or actually the label value).
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.
Skipping for same (weak) reason as above.
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.
Hmm... No. Let me look at this more. Thanks @johscheuer .... Let me do what you suggest.
joshua_remote_cli.sh
Outdated
| exit 1 | ||
| fi | ||
|
|
||
| # Copy joshua.py with patched imports |
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.
Could you explain/document why the patching is required?
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.
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.
(There is no lxml over on the agent pod and joshua.py is being run out of its module context)
|
Address @johscheuer comments. Tested the changes against local cluster. |
0001-Debugging-scripts.patch
Outdated
| @@ -0,0 +1,198 @@ | |||
| From 662a215b2f8901f190f583a3561589c121d3c332 Mon Sep 17 00:00:00 2001 | |||
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.
Was that file uploaded intentionally?
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.
Mistake. Thanks for noticiing.
./joshua_remote_cli.sh --context arn:aws:eks:us-west-2:XXXX:cluster/YYYY --joshua-dir ~/checkouts/fdb/fdb-joshua list --stopped | grep 20260108-051002-pr12617-clang-359e4945-1343-1f14941a72433a82 20260108-051002-pr12617-clang-359e4945-1343-1f14941a72433a82 compressed=True data_size=35334909 duration=510978 ended=10000 fail=1 fail_fast=10 max_runs=10000 pass=9999 priority=100 remaining=0 runtime=0:17:44 sanity=False started=10000 stopped=20260108-052746 submitted=20260108-051002 timeout=5400 username=pr12617-clang-359e4945-13438 delascasas:fdb-joshua stack [fdb-build-test]$ delascasas:fdb-joshua stack [fdb-build-test]$ ./joshua_remote_cli.sh --context arn:aws:eks:us-west-2:XXXX:cluster/YYYY --joshua-dir ~/checkouts/fdb/fdb-joshua tail --errors 20260108-051002-pr12617-clang-359e4945-1343-1f14941a72433a82
Co-authored-by: Johannes Scheuermann <[email protected]>
Co-authored-by: Johannes Scheuermann <[email protected]>
- Improve pod selection using proper Kubernetes labels instead of grep/awk - Add auto-detection of script location - Documentation and comments
889d977 to
0611b8d
Compare
johscheuer
left a comment
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.
LGTM 👍
Make it so can do the 'j' commands against cicd cluster...