Skip to content
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

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

inFocus7
Copy link
Collaborator

@inFocus7 inFocus7 commented Mar 6, 2025

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

@inFocus7 inFocus7 changed the title Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page [WIP | DNM] Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page Mar 6, 2025
@inFocus7 inFocus7 marked this pull request as draft March 6, 2025 18:08
@inFocus7 inFocus7 changed the title [WIP | DNM] Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page Add cluster info gatherer for the upcoming Ambient mesh migration-estimation page Mar 24, 2025
@inFocus7 inFocus7 marked this pull request as ready for review March 24, 2025 15:59
Copy link
Member

@Sodman Sodman left a 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.

nikolasmatt
nikolasmatt previously approved these changes Mar 28, 2025
@nikolasmatt nikolasmatt dismissed their stale review March 28, 2025 17:13

Someone else is taking a look

@@ -0,0 +1,601 @@
#!/bin/sh
Copy link
Member

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.

Copy link
Collaborator Author

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 🤦🏼

Copy link

@Rachael-Graham Rachael-Graham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs side LGTM!

Copy link

@jehawley jehawley left a 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

Comment on lines 135 to 136
elif test("^[0-9]+Ti$") then
(.[0:-2] | tonumber) * 1024 * 1024 * 1024 * 1024

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"

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants