This proposal is for the fallback hostname for server like variants of Fedora to use
localhost as the fallback hostname.
- Name: Dusty Mabe (Fedora CoreOS), David Duncan (Fedora Cloud), Paul Whalen (Fedora IoT), Michel Alexandre Salim (Fedora Server), Neal Gompa (Fedora Workstation/KDE)
- Email: email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com
- Targeted release: Fedora Linux 37
- Last updated: 2022-07-05
- devel thread
- FESCo issue: #2804
- Tracker bug: #2104276
- Release notes tracker: #854
In Fedora 33 the default fallback hostname was changed from
fedora for Fedora Linux instances that didn't get the hostname set in any other way (i.e. it's the fallback if it's not set anywhere else). This change came in a systemd update and was never proposed as a change in Fedora itself.
The enablement upstream was in https://github.com/systemd/systemd/pull/5175 and the BZ requesting the change in Fedora was https://bugzilla.redhat.com/show_bug.cgi?id=1392925. The original reasoning being that
localhost is a bad hostname for auto-discovery protocols (think
avahi) that are useful for more desktop applications.
Unfortunately, this caused issues because setting the hostname via reverse DNS lookups (via NetworkManager) stopped working along with breaking third party tools that set the hostname. The NetworkManager problem was subsequently fixed, but it still remains that a lot of third party software will check to see if an instance's hostname is "unset" by checking the current hostname against the string "localhost". Additionally it appears this change will never be picked up by Fedora's primary downstream in CentOS/RHEL (see https://src.fedoraproject.org/rpms/systemd/c/13d1341b108a24d13f5922054307b5c2efc6836a?branch=rawhide).
The proposal here is to enable variants of Fedora Linux to configure their default/fallback hostname and to set the default for variants targetting servers (Cloud, CoreOS, IoT, Server) to
Benefit to Fedora
With this change Fedora's server-like variants will become more compatible with third party tools that expect a hostname of
localhost means the system is unconfigured. It also will mean system administrator's will see
localhost and assume the hostname is unconfigured.
- Proposal owners:
The feature owners will update the systemd compile time switch for fallback hostname back to
fedora-release package will be updated such that the Fedora Server, IoT, Cloud, and CoreOS editions will use
localhost as the fallback hostname. All other variants of Fedora (the ones that target desktop/laptop uses) will default to
fedora as the fallback hostname.
The proposed changes are a relatively small amount of a work.
- Other developers:
For any variants other than Cloud, CoreOS, IoT, and Server they will see no change. Work with QA to verify other editions continue to have a fallback hostname of
For Cloud, CoreOS, IoT, and Server the default fallback hostname would be
- Release engineering: #Releng issue number
No changes needed for release engineering.
- Policies and guidelines: N/A (not needed for this Change)
- Trademark approval: N/A (not needed for this Change)
- Alignment with Objectives: N/A
There will be NO upgrade impact to systems where:
- An admin statically set the hostname
- A hostname was provided to a system via DHCP
- A hostname was found for a system via reverse DNS lookup
In the case where none of the above are true for a system (i.e. a fallback hostname will be used) the following upgrade impact will be observed:
- Fedora Cloud: No impact. A booted Fedora Cloud 36 instance has
cloud-initon first boot.
- Fedora CoreOS: No impact. Already using
localhostas fallback hostname.
- Fedora IoT: Some impact. The fallback hostname will change from
- Fedora Server: Some impact. The fallback hostname will change from
For Fedora IoT and Fedora Server we will announce the change and encourage users to statically set a hostname for their machines if they don't want the change in behavior.
How To Test
Boot an instance of the flavor of Fedora you are testing in an environment where there is no DHCP hostname provided and no answer to a reverse DNS lookup for the instance IP. Run
hostnamectl hostname and verify that it matches expectation. For Fedora Cloud, CoreOS, IoT, Server it should be
localhost. For all others it should be
For Cloud, CoreOS, IoT and Server users will notice intances now default to
localhost if a hostname is not provided to an instance by any other means. For all other variants of Fedora there will be no change.
There will be changes to the
fedora-release packages for this change.
- Contingency mechanism: Revert the pull requests to the
- Contingency deadline: Final Freeze
- Blocks release? Yes
The fallback hostname has now changed to
localhost for the Cloud, CoreOS, IoT, and Server variants of Fedora.
The fallback hostname has now changed for the Cloud, CoreOS, IoT, and Server editions of Fedora to
localhost. The fallback hostname is the hostname that is set if the hostname cannot be determined by any other mechanism (statically set, DHCP, or reverse DNS). This change was done in order to conform to the common expectation that a hostname of
localhost on a system means the hostname is "unset".