Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1282927 - Default entry in /etc/hostname is 'localhost.localdomain.localdomain' opposed to 'localhost.localdomain'
Default entry in /etc/hostname is 'localhost.localdomain.localdomain' opposed...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity high
: GA
: 5.5.0
Assigned To: Nick Carboni
Jeff Teehan
:
Depends On:
Blocks: RHCS-CFME
  Show dependency treegraph
 
Reported: 2015-11-17 14:50 EST by John Matthews
Modified: 2015-12-08 08:48 EST (History)
9 users (show)

See Also:
Fixed In Version: 5.5.0.12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:48:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2551 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 12:58:09 EST

  None (edit)
Description John Matthews 2015-11-17 14:50:07 EST
Description of problem:

During RHCS integration testing we ran into BZ 1278904
We were unable to validate SSH credentials for a RHEV Hypervisor Host
Root cause was the hostname on the VM was not resolvable so ssh was failing.
hostname was not resolvable because the entry in /etc/hostname was incorrect.


This line was failing:
https://github.com/ManageIQ/manageiq/blame/master/gems/pending/util/MiqSshUtilV2.rb#L258

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

cfme-rhevm-5.5.0.9-2.x86_64.rhevm.ova

How reproducible:

Everytime

Steps to Reproduce:
1. Launch VM and verify file
2. This impacts ability to ssh to a remote host.
   Was unable to validate ssh credentials for a RHEV Host.


Actual results:

# cat /etc/hostname
localhost.localdomain.localdomain


Expected results:

# cat /etc/hostname
localhost.localdomain


Additional info:
Comment 3 Nick Carboni 2015-11-17 15:54:43 EST
What version of RHEV was the appliance deployed on?
Comment 4 John Matthews 2015-11-17 15:57:32 EST
Was seen with RHEV 3.5.5-0.1.el6ev
Comment 5 Nick Carboni 2015-11-18 12:04:54 EST
So it looks like cloudinit was doing something by default to change the hostname. As a first pass I was able to find a workaround on RHEV (3.4) where you can set the hostname at deploy time via the "Advanced Options -> Initial Run -> VM Hostname" box in the "New Virtual Machine" dialog, but this may not be a complete fix because this issue might also exist on other hypervisors.

Also, I was able to configure cloudinit to never change the hostname, which fixed this issue, but also rendered the input referenced above at deploy time useless (it now has no effect); because of this I'm going to try to avoid this option for now.

I'm still looking into setting a default hostname using cloudinit configuration so we can have the best of both worlds, but that may take a bit longer. If I find a way to do that, is there a desired default host name?  Is "localhost.localdomain" what we would want? I'm assuming setting the hostname is one of the first things most people will be doing after they deploy anyway right?
Comment 8 CFME Bot 2015-11-19 14:42:54 EST
New commit detected on ManageIQ/manageiq-appliance/master:
https://github.com/ManageIQ/manageiq-appliance/commit/1926c54093577c1c0542eea14dd80b086b9438ce

commit 1926c54093577c1c0542eea14dd80b086b9438ce
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Tue Nov 17 16:02:44 2015 -0500
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Thu Nov 19 13:50:01 2015 -0500

    Remove cloud-init's ability to change the appliance hostname
    
    The altered hostname was not included in /etc/hosts
    causing us to not be able to resolve it when attempting
    to run `MiqSockUtil.getFullyQualifiedDomainName`
    
    The decision was made to disallow cloud-init from
    changing the hostname at all as to not conflict with our
    existing methods of changing the hostname using the
    appliance_console.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1282927
    https://bugzilla.redhat.com/show_bug.cgi?id=1278904

 COPY/etc/cloud/cloud.cfg.d/miq_cloud.cfg | 2 ++
 1 file changed, 2 insertions(+)
Comment 11 Jeff Teehan 2015-11-30 13:27:39 EST
Looks right.  Tested on 5.5.0.12

For a menu, please type: appliance_console
[root@10-16-6-73 ~]# cat /etc/hostname 
localhost.localdomain
[root@10-16-6-73 ~]#
Comment 13 errata-xmlrpc 2015-12-08 08:48:14 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551

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