Bug 1918681
| Summary: | Transient hostname is lost upon systemd-hostnamed restart | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Renaud Métrich <rmetrich> |
| Component: | systemd | Assignee: | systemd-maint |
| Status: | CLOSED NOTABUG | QA Contact: | Frantisek Sumsal <fsumsal> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.3 | CC: | dtardon, fkrska, systemd-maint-list |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-01-21 14:55:54 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Renaud Métrich
2021-01-21 11:06:28 UTC
I would expect Transient hostname to apply to /proc/sys/kernel/hostname only, but it's not the case. (In reply to Renaud Métrich from comment #1) > I would expect Transient hostname to apply to /proc/sys/kernel/hostname > only, but it's not the case. It does, but only if static hostname (/etc/hostname) is not set. Don't ask me what's the reasoning behind this... (In reply to Renaud Métrich from comment #0) > # hostnamectl --transient set-hostname vm-gui83-renamed > # hostnamectl | grep vm-gui83 > Static hostname: vm-gui83 > Transient hostname: vm-gui83-renamed This is actually a small bug in systemd-hostnamed: the internal data are never updated. In this case, the passed transient hostname was not written into /proc/sys/kernel/hostname because static hostname exists, but the internal transient hostname entry still contains the value passed by hostnamectl. Closing as this works as specified, even if it's a bit weird. |