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:
What version of RHEV was the appliance deployed on?
Was seen with RHEV 3.5.5-0.1.el6ev
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?
https://github.com/ManageIQ/manageiq-appliance/pull/45
New commit detected on ManageIQ/manageiq-appliance/master: https://github.com/ManageIQ/manageiq-appliance/commit/1926c54093577c1c0542eea14dd80b086b9438ce commit 1926c54093577c1c0542eea14dd80b086b9438ce Author: Nick Carboni <ncarboni> AuthorDate: Tue Nov 17 16:02:44 2015 -0500 Commit: Nick Carboni <ncarboni> 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(+)
MR: http://gitlab.cloudforms.lab.eng.rdu2.redhat.com/cloudforms/cfme-appliance/merge_requests/4
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 ~]#
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