cloudfoundry / bosh-azure-cpi-release

BOSH Azure CPI
Apache License 2.0
63 stars 87 forks source link

BOSH group name is often too long to generate an availability set name automatically from #209

Closed dsboulder closed 8 years ago

dsboulder commented 8 years ago

An Avail Set name can only be 80 characters, but BOSH generates a group: field automatically that can exceed this limit easily. For example, a compilation VM has the following automatic name: bosh_director_name-deployment_name-compilation-RANDOM_GUID_FROM_BOSH. Since BOSH inserts a GUID, the deployment name and director name have to be fairly short or things break.

My proposed solution would be to make the AvailSet name be az-MD5-of-bosh-provided-group, if the name is longer than azure allows. What do you think?

dsboulder commented 8 years ago

For background: BOSH recently introduced this group: field in the env hash. Dmitriy wanted the name to be as unique as possible, so he concatenates the DirectorName + DeploymentName + JobName. Sadly this can be quite long, especially with automatically generated compilation VM names, so I'm hoping the CPI can handle the occasional long group name.

AbelHu commented 8 years ago

@dsboulder @cppforlife On Azure the length of the availability set name must be between 1 and 80 characters. env.bosh.group which is generated by BOSH director may be too long. CPI will truncate the name to the following format az-MD5-[LAST-40-CHARACTERS-OF-GROUP] if the length of env.bosh.group is greater than 80.

AbelHu commented 8 years ago

Fix it in this commit