Skip to content

Commit

Permalink
Ensure GCP instance names are a max of 63 characters
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
  • Loading branch information
dims committed Mar 3, 2024
1 parent 19df52c commit 968aefd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e_node/remote/gce/gce_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,9 @@ func (g *GCERunner) imageToInstanceName(imageConfig *internalGCEImage) string {
}
// For benchmark test, node name has the format 'machine-image-uuid' to run
// different machine types with the same image in parallel
return imageConfig.machine + "-" + imageConfig.image + "-" + uuid.New().String()[:8]
name := imageConfig.machine + "-" + imageConfig.image + "-" + uuid.New().String()[:8]
// Sometimes the image is too long, we need instance names to have a max length of 63
return name[:63]
}

func (g *GCERunner) registerGceHostIP(host string) error {
Expand Down

0 comments on commit 968aefd

Please sign in to comment.