Skip to content

Commit

Permalink
Merge pull request #31 from mercedes-benz/feat/longer_hostnames_for_l…
Browse files Browse the repository at this point in the history
…inux

feat: allow longer linux computer names than 15 chars
  • Loading branch information
gabriel-samfira authored Aug 28, 2024
2 parents c57fd43 + 6a29286 commit d8c54d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,9 @@ func (r RunnerSpec) GetNewVMProperties(networkInterfaceID string, sizeSpec VMSiz
}

if r.BootstrapParams.OSType == params.Linux {
// Linux computer names can be up to 63 characters long.
properties.OSProfile.ComputerName = to.Ptr(r.BootstrapParams.Name[:min(len(r.BootstrapParams.Name), 63)])

pubKeys := []*armcompute.SSHPublicKey{}
fakeKey, err := providerUtil.GenerateFakeKey()
if err == nil {
Expand Down

0 comments on commit d8c54d6

Please sign in to comment.