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

Truncation of Windows host name #359

Open
maltman111 opened this issue May 2, 2018 · 4 comments
Open

Truncation of Windows host name #359

maltman111 opened this issue May 2, 2018 · 4 comments

Comments

@maltman111
Copy link

I know this has already been asked but can the hostname length be increased? We are seeing truncation at 12 characters. Can the >= 12 at least be changed to > 12?

  # Truncates the length of `:vm_hostname` to 12 characters for
  # Windows-based operating systems.
  #
  # @api private
  def finalize_vm_hostname!
    string = config[:vm_hostname]

    if windows_os? && string.is_a?(String) && string.size >= 12
      config[:vm_hostname] = "#{string[0...10]}-#{string[-1]}"
    end
  end

Thanks

Matt

@cheeseplus
Copy link
Contributor

As #333 the max is still 15, happy to review a PR for this one but at best anyone is only ever getting 15 cause that's all that is supported.

@maltman111
Copy link
Author

maltman111 commented May 2, 2018

Thank you. I may open a PR for this. My 12 character hostname always ends up like this

hostname12-4 (where - should be 3)

@coderanger
Copy link
Contributor

We're happy to look at it but the deeper question might be "why does it matter?" Probably just use a shorter hostname.

@maltman111
Copy link
Author

maltman111 commented May 2, 2018

We base a lot of builds off of the hostname. I know that isn't the best idea but at the moment, its what we got. Each character specifies where and what it is. All lower level environment boxes are exactly 12 characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants