Bug 1254425 - RHEVH7.1-hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com-not saving the value after reboot
RHEVH7.1-hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com-not saving the...
Status: CLOSED DUPLICATE of bug 1254580
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node (Show other bugs)
3.5.3
x86_64 Linux
unspecified Severity high
: ---
: 3.5.5
Assigned To: Douglas Schilling Landgraf
Virtualization Bugs
node
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-18 01:48 EDT by Nikolai Sednev
Modified: 2016-02-10 15:08 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-18 16:05:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Node
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nikolai Sednev 2015-08-18 01:48:07 EDT
Description of problem:
RHEVH7.1-hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com-not saving the value after reboot.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Hypervisor release 7.1 (20150813.0.el7ev)

How reproducible:
100%

Steps to Reproduce:
1.Install RHEVH7.1 on host.
2.hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com
3.hostnamectl status
4.cat /etc/hostname
5.systemctl restart systemd-hostnamed
6.hostnamectl status
7.reboot
8.Check that now hostname not saved.

Actual results:
hostname not saved and disapears after reboot.

Expected results:
Hostname should stay as configured after rebooting the host.

Additional info:
Comment 2 Nikolai Sednev 2015-08-18 04:37:19 EDT
Tested on Red Hat Enterprise Linux Server release 7.2 Beta (Maipo) and it works as designed.
I also noticed that in RHEVH7.1 the /etc/hostname file does not exist by default, then if hostname changed via nmcli tool, then file created and after rebooting the host it disappears. In order to overcome this system issue, I've edited directly the /etc/sysconfig/network and wrote there HOSTNAME=alma03.qa.lab.tlv.redhat.com manually, this approach had fixed the issue, but it should not be done this way in el7.xs.
P.S.
I see that nmtui is not available within the RHEVH7.1 at all, while it should be there, as starting from RHEL7.0 this network TUI is available and should be used for all network related configurations.
Comment 3 Nikolai Sednev 2015-08-18 04:40:42 EDT
Moving to RHEV product.
Comment 4 Douglas Schilling Landgraf 2015-08-18 16:05:32 EDT
Hi Nikolai,

(In reply to Nikolai Sednev from comment #0)
> Description of problem:
> RHEVH7.1-hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com-not saving
> the value after reboot.
> 
> 
> Version-Release number of selected component (if applicable):
> Red Hat Enterprise Virtualization Hypervisor release 7.1 (20150813.0.el7ev)
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.Install RHEVH7.1 on host.
> 2.hostnamectl set-hostname alma03.qa.lab.tlv.redhat.com
> 3.hostnamectl status
> 4.cat /etc/hostname
> 5.systemctl restart systemd-hostnamed
> 6.hostnamectl status
> 7.reboot
> 8.Check that now hostname not saved.

RHEV-H doesn't support commands by console. You must use the Text User Interface, in this case, Network tab and set Hostname.

Your report looks equals to BZ#1254580, I will mark this one as duplicate for now. Fell free to re-open in case you believe it's a different scenario.

*** This bug has been marked as a duplicate of bug 1254580 ***
Comment 5 Douglas Schilling Landgraf 2015-08-18 16:20:39 EDT
(In reply to Nikolai Sednev from comment #2)
> Tested on Red Hat Enterprise Linux Server release 7.2 Beta (Maipo) and it
> works as designed.
> I also noticed that in RHEVH7.1 the /etc/hostname file does not exist by
> default, then if hostname changed via nmcli tool, then file created and
> after rebooting the host it disappears. In order to overcome this system
> issue, I've edited directly the /etc/sysconfig/network and wrote there
> HOSTNAME=alma03.qa.lab.tlv.redhat.com manually, this approach had fixed the
> issue, but it should not be done this way in el7.xs.

To have the file /etc/hostname you must use hostnamectl --static set-hostname alma03.qa.lab.tlv.redhat.com

The --static option saves the new hostname into /etc/hostname.

From:
http://www.freedesktop.org/software/systemd/man/hostnamectl.html

"The static hostname is stored in /etc/hostname,"

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