Bug 1134404 - non-persistent hostname is set to 'short' hostname
Summary: non-persistent hostname is set to 'short' hostname
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: cloud-init
Version: el6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pádraig Brady
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-27 13:03 UTC by Siert Z.
Modified: 2019-08-29 15:31 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-08-29 15:31:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix set_hostname (672 bytes, text/plain)
2014-08-27 13:03 UTC, Siert Z.
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1246485 0 None None None Never

Description Siert Z. 2014-08-27 13:03:08 UTC
Created attachment 931457 [details]
Fix set_hostname

Description of problem:

Distro.set_hostname() uses wrong hostname when calling _apply_hostname().

On initial boot, the hostname is set to the short name, but after reboot it is set to the fqdn. 

Version-Release number of selected component (if applicable):

  0.7.4-2

How reproducible:

  On openstack or AWS, use the following user data:

    #cloud-config
    manage_etc_hosts: true
    hostname: myhostname
    fqdn: myhostname.domain.tld

  Launch the machine and login. Then run hostname:

    [root@myhostname ~]# hostname
    myhostname

  Reboot.

  Login and run hostname again:

  [root@myhostname ~]# hostname
  myhostname.domain.tld


Expected results:

  [root@myhostname ~]# hostname
  myhostname.domain.tld
  
Additional info:

Patch attached works against current version in EPEL.

Comment 1 Luis Fernández Álvarez 2014-11-25 15:43:51 UTC
Hi,

Any update on this bug? It's really simple and solves the problem.

Could it be shipped in the next release?

Comment 2 Jan van Eldik 2015-02-20 12:38:43 UTC
Hi,

A fix has been committed upstream to address this issue. Are we getting closer to a fix in the EPEL RPM, or is an upstream release required?

Thanks!

Comment 3 Matej Susta 2015-03-23 16:53:49 UTC
There's a cloud-init-0:0.7.5-10.el6.centos.2.x86_64 available in centos-extras repository.

Comment 4 Dusty Mabe 2019-08-29 15:31:28 UTC
This package is no longer included in epel7. https://src.fedoraproject.org/rpms/cloud-init/c/aeebc66ebb93afe224cc4752a58955dad03a5dde?branch=epel7


Note You need to log in before you can comment on or make changes to this bug.