-
Bug
-
Resolution: Won't Do
-
Normal
-
None
-
rhel-8.3.0, rhel-9.3.0
-
None
-
Moderate
-
rhel-sst-installer
-
ssg_front_door
-
None
-
False
-
-
No
-
None
-
None
-
None
-
If docs needed, set a value
-
-
All
-
None
Description of problem:
When modifying the hostname through using the initial-setup GUI or Text interface, upon exiting the tool, the hostname is not used on the system, as shown in the example below, consisting in renaming "vm-gui83" into "vm-gui83-renamed":
1. Before renaming
- hostnamectl | grep "vm-gui83"; cat /etc/hostname /proc/sys/kernel/hostname
Static hostname: vm-gui83
vm-gui83
vm-gui83
2. After renaming and clicking on "Apply" (GUI only)
- hostnamectl | grep "vm-gui83"; cat /etc/hostname /proc/sys/kernel/hostname
Static hostname: vm-gui83
Transient hostname: vm-gui83-renamed
vm-gui83
vm-gui83
3. After exiting the configuration tool
- hostnamectl | grep "vm-gui83"; cat /etc/hostname /proc/sys/kernel/hostname
Static hostname: vm-gui83
Transient hostname: vm-gui83-renamed
vm-gui83
vm-gui83
--> hostname not applied
In fact, in order for the hostname to apply really (reflecting in /proc/sys/kernel/hostname), it is necessary to wait for systemd-hostnamed service to exit, then issue a "hostnamectl" command. The systemd-hostnamed service will then discover that /etc/hostname (set by initial-setup) is different than current hostname (old not renamed "vm-gui83") and apply the modification.
The bug here is that initial-setup should modify the Static hostname upon finishing the configuration, not the Transient hostname.
4. After systemd-hostnamed exited and a "hostnamectl" was issue again
- hostnamectl | grep "vm-gui83"; cat /etc/hostname /proc/sys/kernel/hostname
Static hostname: vm-gui83-renamed
vm-gui83-renamed
vm-gui83-renamed
--> hostname finally applied
Version-Release number of selected component (if applicable):
initial-setup-0.3.81.6-1.el8.x86_64
How reproducible:
Always, see procedure above.
To start the initial-setup on boot, just enable "initial-setup-reconfiguration.service", "touch /.unconfigured" and reboot