← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1921004] Re: Add an option to use short hostname in RHEL

 

This bug is believed to be fixed in cloud-init in version 21.2. If this
is still a problem for you, please make a comment and set the state back
to New

Thank you.

** Changed in: cloud-init
       Status: Triaged => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1921004

Title:
  Add an option to use short hostname in RHEL

Status in cloud-init:
  Fix Released

Bug description:
  cloud init with RHEL always use the FQDN over the hostname even if the hostname is sent like below
  #cloud-config
  ---
  hostname: shortname

  the problem with always using the FQDN as hostname is the linux
  constrain on hostname length

  getconf HOST_NAME_MAX
  64

  the FQDN is used for DNS and the DNS servers has no limit on that but
  using as hostname raise an error when cloud init try to set the
  hostname and fail cloud init

  an option should be provided for RHEL like below

  #cloud-config
  ---
  enable_shortname: true 

  to change the default behavior from FQDN to the
  1. hostname if send
  2. short hostname from the FQDN

  and the /etc/resolv.conf
  search <domain>

  so if the hostname is test.domain.com

  the hostname will be *test*
  and the
  /etc/resolv.conf
  search domain.com

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1921004/+subscriptions


References