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

Use uuid instead of random integer to provide more uniform random generated hostnames if hostname is not available #1257

Closed
mikhail-sakhnov opened this issue Feb 12, 2025 · 1 comment · Fixed by #1297
Labels
a/tech_debt Area: related to tech debt c/autoscaling/autoscaler-agent Component: autoscaling: autoscaler-agent

Comments

@mikhail-sakhnov
Copy link
Contributor

In a case if hostname is not available we use random int (0,100) to generate a hostname. With the small probability it might be the same generated hostname in two different pods.

More context:

Originally posted by @mikhail-sakhnov in #1242 (comment)

@stradig
Copy link
Contributor

stradig commented Mar 3, 2025

Or maybe better return an error, if we fail to get a hostname from the OS.

@sharnoff sharnoff added a/tech_debt Area: related to tech debt c/autoscaling/autoscaler-agent Component: autoscaling: autoscaler-agent labels Mar 4, 2025
sharnoff added a commit that referenced this issue Mar 4, 2025
Fixes #1257; the random hostname generation is a fallback that isn't ever
used, so we should remove it to reduce confusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a/tech_debt Area: related to tech debt c/autoscaling/autoscaler-agent Component: autoscaling: autoscaler-agent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants