-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page #1
base: main
Are you sure you want to change the base?
Conversation
…targets for validity of scripts
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.
Overall LGTM! Few nits / couple questions:
- Let's move known TODOs into GH issues so we can track & prioritize appropriately.
- Anecdotally, did we end up saving much time from adding parallelism when run against the same example clusters?
- I ran this locally on my ARM Mac and it worked great. Can we confirm it also works fine when run from linux?
TODO(me): after this merges, look into how to route a run.solo.io/ to the script.
I can help you set this up, this is handled by one of our infra clusters, should be super quick once we have the url to this committed file on main.
@@ -0,0 +1,601 @@ | |||
#!/bin/sh |
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.
When I cloned this repo and tried to run this, I had to chmod +x
this file - this is something we can commit to the repo.
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.
Ah thanks, I thought I ran this before 🤦🏼
Co-authored-by: Rachael Graham <[email protected]>
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.
Docs side LGTM!
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.
I'm not convinced all of these comments need to be addressed, but it does seem like there are some bugs that you might want to deal with and some potential for incompatibility with different shell implementations
elif test("^[0-9]+Ti$") then | ||
(.[0:-2] | tonumber) * 1024 * 1024 * 1024 * 1024 |
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.
Looking around it seems like jq uses C++ doubles to represent numbers. I think these numbers are within the maximum capacity of a double, but they certainly exceed the numbers that can be represented exactly with a double. That may not be a problem, but it's good to be aware of.
if command -v nproc > /dev/null; then | ||
CORES=$(nproc) | ||
MAX_PARALLEL=$((CORES > 8 ? 8 : CORES)) | ||
log_info "System has $CORES cores, using $MAX_PARALLEL parallel processes for namespace processing" |
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 we wouldn't be running in parallel (i.e. MAX_PARALLEL=1
), it would probably be nice not to log messages implying that we are. But that seems like a good candidate for something to do in a follow-up / never.
TODO(me): after this merges, look into how to route a
run.solo.io/<something>
to the script.# AMBIENT MESH MIGRATION TOOL.md
semi-recent demo (before parallelization): https://solo.zoom.us/rec/share/_L8eKVpIcICLcQoi_gpld7mC8c3ZNTNO3QT4bZSJYYdCNwdAwq2GVtIHX2ShIsQB.EQEzF1burT5m4f0q?startTime=1742319075000&pwd=WMcybNCxjmMkrWFkqbXduFT75tOfrJbh