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
Truncate GCE load balancer names to 63 chars #7609
Conversation
// Hash and truncate | ||
hash := md5.Sum([]byte(name)) | ||
truncated := name[0 : LOAD_BALANCER_NAME_MAX_LENGTH-6] | ||
shortHash := hash[0:6] |
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.
nit: can just do [:6] here
LGTM |
Truncate GCE load balancer names to 63 chars
Maybe I've missed something. The change makes sense to me, but are you going to revert the changes in #7145? If not, the origName will always be shorter than 32 bytes because of the logic in GetLoadBalancerName(), thus the hash function will never be called. |
…sts that were relying on it.
…sts that were relying on it.
I'd propose rolling this PR back until we've thought this through and tested it better. |
@a-robinson
Closes #6812