Bug 1779182 - After host deploy into RHV the host FQDN changed to localhost.localdomain
Summary: After host deploy into RHV the host FQDN changed to localhost.localdomain
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: ovirt-host-deploy-ansible
Version: 4.4.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ovirt-4.4.0
: ---
Assignee: Dominik Holler
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1770030
TreeView+ depends on / blocked
 
Reported: 2019-12-03 13:18 UTC by Michael Burman
Modified: 2019-12-11 11:59 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-11 11:59:27 UTC
oVirt Team: Network
Embargoed:
pm-rhel: ovirt-4.4+


Attachments (Terms of Use)

Description Michael Burman 2019-12-03 13:18:35 UTC
Description of problem:
After host deploy into RHV the host FQDN changed to localhost.localdomain

This bug similar to what happening with HE deploy described in BZ 1770030

After we adding a fresh 4.4 host into 4.4 RHV over i'ts hostname, the hostname is overriden with localhost.localdomain

Version-Release number of selected component (if applicable):
4.4.0-0.6.master.el7
vdsm-4.40.0-154.git4e13ea9.el8ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install fresh 8.1/4.4 server
2. Check hostnamectl and add the host to RHV over it's hostname FQDN
3. After deploy done, run hostnamectl on the server

Actual results:
localhost.localdomain

Expected results:
Host's real FQDN

Additional info:
See also BZ 1770030

Comment 4 Martin Perina 2019-12-03 13:59:17 UTC
As mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1770030#c1 host-deploy doesn't alter hostname at all. Dominik, could you please take a look if this is not some new NM on RHEL 8 feature?

Comment 6 Martin Perina 2019-12-03 14:20:01 UTC
According to https://docs.fedoraproject.org/en-US/Fedora/18/html/System_Administrators_Guide/s1_Using_Hostnamectl.html transient hostname is maintained by kernel, so if you should make it persistent by calling hostnamectl, no? Or am I missing something?

Comment 7 Michael Burman 2019-12-03 14:31:41 UTC
(In reply to Martin Perina from comment #6)
> According to
> https://docs.fedoraproject.org/en-US/Fedora/18/html/
> System_Administrators_Guide/s1_Using_Hostnamectl.html transient hostname is
> maintained by kernel, so if you should make it persistent by calling
> hostnamectl, no? Or am I missing something?

We never touch the hostname with hostnamectl. In rhel7 we didn't saw such behavior at all. hostname was persisted all time without doing anything specific.
It seems to be some difference between rhel 7 and rhel8

Comment 8 Dominik Holler 2019-12-03 15:49:33 UTC
Looks similar to bug 1419906 .

Comment 10 Beniamino Galvani 2019-12-04 10:06:01 UTC
Hi,

initially the system doesn't have a hostname. Then we get a connection
on enp1s0f0 and the hostname is updated via reverse lookup on enp1s0f0:

 07:15:25 <info>  [1575375325.8736] device (enp1s0f0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
 07:15:25 <info>  [1575375325.8748] policy: set 'enp1s0f0' (enp1s0f0) as default for IPv4 routing and DNS
 07:15:25 <info>  [1575375325.9400] device (enp1s0f0): Activation: successful, device activated.
 07:15:25 <info>  [1575375325.9904] policy: set-hostname: set hostname to 'vega08.qa.lab.tlv.redhat.com' (from address lookup)

Later, someone issues a reload of connections and enp1s0f0 becomes
unmanaged. Since there is no longer an active connection on enp1s0f0,
the hostname that was got via reverse lookup on the interface is
withdrawn:

 07:59:43 <info>  [1575377983.1764] audit: op="connections-reload" pid=4763 uid=0 result="success"
 07:59:43 <info>  [1575377983.3085] audit: op="connections-load" args="/etc/sysconfig/network-scripts/ifcfg-enp1s0f0" pid=4864 uid=0 result="success"
 ...
 08:02:51 <info>  [1575378171.1263] policy: set-hostname: set hostname to 'localhost.localdomain' (no IP config)
 08:02:51 <info>  [1575378171.1621] device (enp1s0f0): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'managed')

I don't think this behavior changed from RHEL 7.

Comment 12 Dominik Holler 2019-12-04 14:44:46 UTC
Benjamino, the RHEL8 behavior is different from RHEL7 behavior for sure.
Do you consider this as a bug, or is the changed behavior acceptable for you?

Comment 13 Beniamino Galvani 2019-12-04 15:07:46 UTC
(In reply to Dominik Holler from comment #12)
> Benjamino, the RHEL8 behavior is different from RHEL7 behavior for sure.
> Do you consider this as a bug, or is the changed behavior acceptable for you?

Do you have logs from a RHEL7 system? I did a quick test on RHEL 7.7 and the NM behavior (under the same conditions, i.e. the device that has network connectivity gets NM_CONTROLLED=no) is the same.

Comment 17 Radek Vykydal 2019-12-10 11:53:32 UTC
Hello, I would like to investigate on Anaconda side on possible change of behaviour which seems to happen based on different content of /etc/hostname mentioned in comment #14.

Could you please post a link to rhv installation image (iso) that would reproduce the issue and to another one (is there any such RHEL 8 ?) in which the behaviour is same as expected? (Also any related configuration, eg kickstart etc..)


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